> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Andy Ross > Sent: 26 May 2005 17:33 > To: FlightGear developers discussions > Subject: Re: [Flightgear-devel] Re: FlightGear startup time > > > Richard Bytheway wrote: > > Would it be possible to have a compiled form stroed on disk, which > > is automatically regenerated on startup of FGFS based on rules > > similar to make. If the ASCII version is newer than the compiled > > version, rebuild the compiled version. > > Sorry, but that sounds dumb. Wouldn't it be a better idea to try to > figure out why it is slow in the first place before making all our > configuration files non-editable? > > We really don't have that much XML to parse at startup; if it's really > a performance limitation, then it's because we're doing something slow > with our XML parsing. > > Andy
Yes, figuring out why it is slow in the first place is a good idea, and I see from later messages that you have done some investigation into this already. But I don't think it is a dumb idea per se. Maybe I didn't elaborate enough: I suggest keeping the editable configuration files, exactly as they are now. When FlightGear starts, and it want to use one of the config/data files, it first looks for a binary (compiled) representation of the file. If it cannot find it, it reads the editable version (slowly), and in the process creates the "compiled" version and stores it somewhere on disk. If the compiled version exists, the file timestamp is compared with the relevant editable "source" file. If the compiled version is newer, then it is used, if the compiled version is older than the editable file then the compiled version is recreated as if it didn't exist. I guess that a better description might be a "pre-parsed disk based cache of the Airport and Navigation data, and possibly the configuration files". On my Cygwin system here (Athlon 1GHz, 384MB RAM, Windows 2000) CVS from 9am this morning (UK time) startup timings for all defaults are: Elapsed Time (s) Event ---------------- ----- 0 Start 3 Splash Screen Up 105 Airport and Nav Data done 252 Aircraft Loaded 258 Sky done 260 Subsystems done 341 Ready to fly So the bulk of the time is in loading the Airport and Nav data, and the aircraft. I shall try your patches and report what difference they make. Richard ________________________________________________________________________ This e-mail has been scanned for Bede Scientific Instruments for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ _______________________________________________ Flightgear-devel mailing list [email protected] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
