Implement a persistent cache for navigation data.
authorJames Turner <zakalawe@mac.com>
Mon, 27 Aug 2012 23:26:36 +0000 (00:26 +0100)
committerJames Turner <zakalawe@mac.com>
Wed, 19 Sep 2012 10:38:19 +0000 (11:38 +0100)
commit9b900e94304b95337e2731946525cde4ef377da9
treeff3d72e84d101c049e528413989755d4d1146e73
parent48c26079e19fe7c4c2a5e60e3e670e430bff3c62
Implement a persistent cache for navigation data.

Cache the parsed navigation and airport data in a binary file to reduce
startup times and memory consumption (since only referenced FGPositioned
elements are held in memory).

Data will be reimported when the mod-time of any input file is changed.
If a global file is changed (nav.dat, awy.dat, apt.dat, etc), the cache
will be completely rebuilt, which takes approximately 30 seconds on
moderate hardware. (Future work may reduce this).
54 files changed:
src/ATC/CommStation.cxx
src/ATC/CommStation.hxx
src/Airports/apt_loader.cxx
src/Airports/apt_loader.hxx
src/Airports/groundnetwork.cxx
src/Airports/groundnetwork.hxx
src/Airports/pavement.cxx
src/Airports/pavement.hxx
src/Airports/runwaybase.cxx
src/Airports/runwaybase.hxx
src/Airports/runways.cxx
src/Airports/runways.hxx
src/Airports/simple.cxx
src/Airports/simple.hxx
src/GUI/AirportList.cxx
src/GUI/MapWidget.cxx
src/Instrumentation/NavDisplay.cxx
src/Instrumentation/adf.cxx
src/Instrumentation/adf.hxx
src/Instrumentation/dclgps.cxx
src/Instrumentation/dme.cxx
src/Instrumentation/kr_87.cxx
src/Instrumentation/navradio.cxx
src/Instrumentation/newnavradio.cxx
src/Instrumentation/tacan.cxx
src/Instrumentation/tacan.hxx
src/Main/CMakeLists.txt
src/Main/fg_init.cxx
src/Main/globals.hxx
src/Main/main.cxx
src/Main/positioninit.cxx
src/Navaids/CMakeLists.txt
src/Navaids/NavDataCache.cxx [new file with mode: 0644]
src/Navaids/NavDataCache.hxx [new file with mode: 0644]
src/Navaids/PositionedOctree.cxx [new file with mode: 0644]
src/Navaids/PositionedOctree.hxx [new file with mode: 0644]
src/Navaids/airways.cxx
src/Navaids/airways.hxx
src/Navaids/fix.hxx
src/Navaids/fixlist.cxx
src/Navaids/fixlist.hxx
src/Navaids/markerbeacon.cxx
src/Navaids/markerbeacon.hxx
src/Navaids/navdb.cxx
src/Navaids/navdb.hxx
src/Navaids/navlist.cxx
src/Navaids/navlist.hxx
src/Navaids/navrecord.cxx
src/Navaids/navrecord.hxx
src/Navaids/positioned.cxx
src/Navaids/positioned.hxx
src/Navaids/sqlite3.c [new file with mode: 0644]
src/Navaids/sqlite3.h [new file with mode: 0644]
src/Scripting/NasalPositioned.cxx