Jump to content
The simFlight Network Forums

Recommended Posts

Posted (edited)

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
Posted
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

 

Posted
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

 

Posted
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

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.