Jump to content
The simFlight Network Forums

Ram usage shoots up


Recommended Posts

Hi,

Im developing a program, I managed to get the list of gates from airport, check if the player is at the gate. Issue im having is that my app is using around 70mb of ram, the minute it loads the database in, shoots up to about 320mb ram. Seems like its loading everything in. Is there a way to get it to just load specified airport and get the gates from it? 
 

im coding it in vb

 

thanks in advance 

Edited by LukeC88
Link to comment
Share on other sites

2 hours ago, LukeC88 said:

Im developing a program, I managed to get the list of gates from airport, check if the player is at the gate. Issue im having is that my app is using around 70mb of ram, the minute it loads the database in, shoots up to about 320mb ram. Seems like its loading everything in. Is there a way to get it to just load specified airport and get the gates from it?

First, can you explain why you are posting this question here? Are you using one of the programs we support? I think really you would be better off posting in a more general programming forum, like https://www.fsdeveloper.com/forum/

Second, the amount of a file you read in a program is up to you to control. If you are searching through a file the fastest way is, of course, to read it all into memory first. But you could just read a small part at a time -- one line even. It's entirely up to you, surely?

Third, 320 Mb is nothing to worry about in these days of memory measured in Gigabytes. The only think you'd need to worry about is if you have a memory leak, where memory to allocated is not being freed.

Pete

 

Link to comment
Share on other sites

On 5/25/2021 at 9:11 AM, Pete Dowson said:

First, can you explain why you are posting this question here? Are you using one of the programs we support? I think really you would be better off posting in a more general programming forum, like https://www.fsdeveloper.com/forum/

Second, the amount of a file you read in a program is up to you to control. If you are searching through a file the fastest way is, of course, to read it all into memory first. But you could just read a small part at a time -- one line even. It's entirely up to you, surely?

Third, 320 Mb is nothing to worry about in these days of memory measured in Gigabytes. The only think you'd need to worry about is if you have a memory leak, where memory to allocated is not being freed.

Pete

 

Hi Pete, Thank you for getting back to me. I managed to work it out. I simply just referenced the two airports I need. Also been trying to work it out, is there a way to detect if player is at any gate at destination airport. Been using the tutorial and it only comes up true when I select an airport from cbxGate.text

 

Link to comment
Share on other sites

2 hours ago, LukeC88 said:

is there a way to detect if player is at any gate at destination airport. Been using the tutorial and it only comes up true when I select an airport from cbxGate.text

Sorry, I am still lost. What "tutorial" are you talking about? And what is "cbxGate.text"? Are you sure you are not still posting in the wrong Forum?

Pete

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.