Board index FlightGear Development New features

quick reload of settings (data cache)

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

quick reload of settings (data cache)

Postby rico001 » Mon Jan 14, 2008 11:41 pm

Using Flightgear version 1.0 for windows
I've noticed that after I'm done flying/crashing I press Esc+Yes and if I simply go back through the flightgear wizard to simply pick a new plane. It will reload the whole game into memory again, even though nothing has changed from before except for the aircraft.

Is there a cache feature with version 1 so it doesn't do this?

Thanks.
rico001
 
Posts: 65
Joined: Wed Oct 17, 2007 6:14 pm

in summary

Postby rico001 » Wed Jan 16, 2008 7:34 pm

in summary, I mean you could switch aircraft without reloading the level.

I am using fgrun.
rico001
 
Posts: 65
Joined: Wed Oct 17, 2007 6:14 pm

Postby Gijs » Wed Jan 16, 2008 9:06 pm

I thought it wasn't possibl yet. But it's something we desperately needs. It's just not logical to load everything again when you just change aircraft.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9390
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Postby Fahim Dalvi » Thu Jan 17, 2008 8:08 am

yeah...but i noticed that it only takes long the first time i start flightgear....after that it loads quickly.
User avatar
Fahim Dalvi
 
Posts: 1286
Joined: Sun Oct 14, 2007 1:08 pm
Location: Qatar
Callsign: Fahim
Version: 2018.2.2
OS: MacOS

Re: quick reload of settings (data cache)

Postby rico001 » Tue Aug 05, 2008 7:57 pm

It still takes over a minute for me

Here is a basic algorithm

DiskCache=0 //off by default
Scanforchanges=0 //doesn't scan directory such as Scenery, and Aircraft by default.

On the First run or when directories such as Scenery or Aircraft are modified

create or update as necessary the disk cache so loading times are minimal

The disk cache will require more hard drive space

Rigs of Rods, another game but closed source, has a similiar feature I think
Last edited by rico001 on Wed Aug 06, 2008 12:09 am, edited 1 time in total.
rico001
 
Posts: 65
Joined: Wed Oct 17, 2007 6:14 pm

Re: quick reload of settings (data cache)

Postby Natovr » Tue Aug 05, 2008 8:39 pm

This will not have to be implemented urgently if a plane can be switched while FG is running... or the latter will be easier to implement when the first idea is implemented already ;)

PS: There are no levels in FG :p
Callsign: ZS-NVR (mil/priv)IVA-003 (com)
Part of Island Virtual Airways, one of Flightgear's
Natovr
 
Posts: 958
Joined: Fri Feb 22, 2008 11:11 am
Location: United Queendom

Re: quick reload of settings (data cache)

Postby rico001 » Wed Aug 06, 2008 12:12 am

Natovr wrote:This will not have to be implemented urgently if a plane can be switched while FG is running... or the latter will be easier to implement when the first idea is implemented already ;)

PS: There are no levels in FG :p

Your right;

Maybe a recent files list to quickly pick another plane/scenery instead, or do you or anyone have any suggestions besides typing in a new map/airport/ name by hand?
rico001
 
Posts: 65
Joined: Wed Oct 17, 2007 6:14 pm

Re: quick reload of settings (data cache)

Postby rico001 » Tue Aug 19, 2008 4:57 pm

rico001 wrote:It still takes over a minute for me

Here is a basic algorithm

DiskCache=0 //off by default
Scanforchanges=0 //doesn't scan directory such as Scenery, and Aircraft by default.

On the First run or when directories such as Scenery or Aircraft are modified

create or update as necessary the disk cache so loading times are minimal

The disk cache will require more hard drive space

Rigs of Rods, another game but closed source, has a similiar feature I think



Looking over the Scenery folder the Terrian data is compressed,
someone could make a mod or addon so that the data is decompressed and put in a folder. Then Flightgear would have to be modified so that it reads from this cache of decompressed files instead of the compressed files. The original compressed files could probably be deleted to save space.

Don't know if this would stop the load times?
rico001
 
Posts: 65
Joined: Wed Oct 17, 2007 6:14 pm

Re: quick reload of settings (data cache)

Postby rico001 » Tue Aug 24, 2010 3:06 pm

rico001 wrote:
Natovr wrote:This will not have to be implemented urgently if a plane can be switched while FG is running... or the latter will be easier to implement when the first idea is implemented already ;)

PS: There are no levels in FG :p

Your right;

Maybe a recent files list to quickly pick another plane/scenery instead, or do you or anyone have any suggestions besides typing in a new map/airport/ name by hand?
Maybe the settings you pick in fgrun such as the airport etc. could be loaded into the cache on star--. Can saved games be accessed by command line? Other thoughts I had were:
-- give flightgear a ramdisk so items could be easily swapped in and out of memory
-- save states like emulators have.
rico001
 
Posts: 65
Joined: Wed Oct 17, 2007 6:14 pm

Re: quick reload of settings (data cache)

Postby Hooray » Tue Sep 07, 2010 5:11 pm

rico001 wrote:Maybe a recent files list to quickly pick another plane/scenery instead

We can give you the MRU list right away, but it won't be of any help ... :-)
Really, FlightGear would not know how to load (or even RELOAD) an aircraft at runtime.

Usually, not even RESETS (same aircraft, same location) work properly. But the latter is mostly a matter of aircraft developers not implementing their aircraft with this feature in mind.

There are however some pretty good examples on how to do this right, the bo105 for example can be reliably reset and repositioned without crashing FlightGear, and also without ending up with an aircraft that no longer works properly. This is somewhat tricky to get right, because it also involves resetting aircraft specific state to a valid state, including all emulated systems - depending on the amount of Nasal script that is running, you need to explicitly code for this.

For simple aircraft, it will usually suffice to register a listener for the reinit signal and then stop all running loops, timers, listeners and re-initialize all data.

Still, this can be really complex - just imagine complex aircraft models with lots of Nasal code... (concore, airbus, 777)

You can read up on this in the wiki: http://wiki.flightgear.org/index.php/Fl ... r_Sessions

I think you can now imagine how complicated this can be just for doing resets right, things get even more complicated once you need to switch planes at runtime, or once you want to save and load flights.

All of this is not even yet taking other subsystems into account (AI, FDM, Autopilot and so on), all of these would need to have working support for re-initialization, and I don't just mean an empty method that satisfies the abstract interface ...

And this is exactly where I disagree with the wiki article: This is the sort of stuff that simply CANNOT work without explicit coding, and due to the complexity of most aircraft in FlightGear this really is no longer an issue of core development alone, but also a very important issue for aircraft developers: core developers will NEVER be able to implement support for switching planes or saving and loading flights if aircraft developers don't start to implement their aircraft accordingly to register the corresponding listeners and handlers.

The same holds true for entire subsystems implemented in Nasal space (bombable, local-weather or guided missiles): these will all complicate implementing support for runtime reinitialization.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11469
Joined: Tue Mar 25, 2008 8:40 am

Re: quick reload of settings (data cache)

Postby rico001 » Sun Jan 23, 2011 8:21 pm

Hooray wrote in Tue Sep 07, 2010 5:11 pm:
rico001 wrote:Maybe a recent files list to quickly pick another plane/scenery instead

We can give you the MRU list right away, but it won't be of any help ... :-)
Really, FlightGear would not know how to load (or even RELOAD) an aircraft at runtime.
....The same holds true for entire subsystems implemented in Nasal space (bombable, local-weather or guided missiles): these will all complicate implementing support for runtime reinitialization.

Thanks for replying I've figured out from looking at some forums, FSX and firefox, another basic algorithm to speed up load time, or a general way to look at it, is to eliminate the number of file reads, so yeah this makes sense.
rico001
 
Posts: 65
Joined: Wed Oct 17, 2007 6:14 pm

Re: quick reload of settings (data cache)

Postby rico001 » Sun May 08, 2016 8:08 pm

Today I came up with another idea.... Throw everything into ram and use it like a ram disk. You could check on install if the user had enough ram.... You could also do this in the background and beep, when ready to use, for example have it run on computer startup automatically. Some Operating Systems have programs that minimize applications on start, such as trayit.

RAMdisk technology is already available for linux and windows and is said to offer 10-25X performance gains over SSD's. I've also done research on these in the past. From my experience it makes a notable difference in web browsing. There are free solutions available, such as AMD ramdisk (ad-supported to payware) or IMDisk.

:) Thanks Hooray!
Last edited by rico001 on Fri Jul 22, 2016 5:48 pm, edited 3 times in total.
rico001
 
Posts: 65
Joined: Wed Oct 17, 2007 6:14 pm

Re: quick reload of settings (data cache)

Postby Hooray » Mon May 09, 2016 11:07 am

there are separate tools to help you do that, i.e. that set up a ram disk and which will move data assets there - but basically, you could just as well get a SSD drive.

Anyway, at least you are being very consistent here - I mean, it's been 8+ years since you started this topic, happy anniversary ! ;-)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11469
Joined: Tue Mar 25, 2008 8:40 am


Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest