Board index FlightGear Development Scenery

Shared Objects and Memory Use  Topic is solved

Questions and discussion about enhancing and populating the FlightGear world.

Shared Objects and Memory Use

Postby pb321 » Thu Apr 05, 2018 3:22 am

If there are 25 instances of a shared object placed at an airport, is the memory for just one of them (say 20Kb) held and not released during the entire use of FlightGear until the program is closed or is it 25 instances X 20 Kb/instance = 500 Kb that is not released? Are there any guidelines for how many shared objects should be placed at an airport (or total RAM used by shared objects) so the average FlightGear user does not experience a significant framerate loss?
pb321
 
Posts: 424
Joined: Sun Nov 27, 2016 5:08 pm
Version: 2020.4.0
OS: Windows 10 Pro

Re: Shared Objects and Memory Use

Postby Catalanoic » Thu Apr 05, 2018 10:37 am

Interesting point to look at, there're over populated airports and others are empty.
User avatar
Catalanoic
 
Posts: 1099
Joined: Mon Mar 05, 2012 1:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Shared Objects and Memory Use  

Postby Thorsten » Thu Apr 05, 2018 11:00 am

Memory usage (as long as memory isn't full and the machine goes into swap) usually does not cause framerate loss.

If there are 'many' objects in the scene (like for OSM2City), the thing that helps a lot with faster rendering is merging them together so that they can be done in one draw (this however makes scenery database management awkward, so outside OSM2City it is not encouraged).

Designing your 3d models properly to avoid unnecessary draws is likely to be more effective than worrying about their total number.

In general, go ahead and populate an airport as much as you enjoy - if that's too much for a user, there's still ~19.999 other airports in the world which are near empty and can be used instead - and time is with you, in two years from now computers will be faster again.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Shared Objects and Memory Use

Postby pb321 » Thu Apr 05, 2018 5:24 pm

Thank you for your answer, Thorsten. I will add objects as it makes sense then and focus on developing models with low frame rate impact.
pb321
 
Posts: 424
Joined: Sun Nov 27, 2016 5:08 pm
Version: 2020.4.0
OS: Windows 10 Pro


Return to Scenery

Who is online

Users browsing this forum: No registered users and 5 guests