Main Menu

1.1 Beta "Collect Flightplans" optimization

Started by jstnj, March 18, 2022, 02:00:48 PM

Previous topic - Next topic

jstnj

AIG manager 1.1 takes forever to start up. This is due to multiple reasons obviously, but one is flightplan collection:

  • Enhancing flightplan parsing logic. Add caching, possibly by storing a checksum in cache and skip all files that match?
  • Ignore a mod folder once it has found files within it do not contain pertinent flight plan info?
  • Do not perform flightplan collection at startup, let the user trigger it via the UI?


An example of inefficiency here is Giast's AI Ship mod, where AI manager iterates through the entire directory like this on every startup of AIM:

Collect flightplans from: D:\MSFS\_addonLinker\gaist-ultra-BETA\Scenery
    Files in directory: 2158
        FP is boat: traffic_Ships_Africa_Durban_73190.bgl
        FP is boat: traffic_Ships_Asia_Incheon_49146.bgl
        FP is boat: traffic_Ships_Arabia_Pirate_50963.bgl
        FP is boat: traffic_Ships_Africa_Djibouti_74103.bgl
        FP is boat: traffic_Ships_Arabia_Suez_50967.bgl
        FP is boat: traffic_Ships_Africa_Somalia_49007.bgl
        FP is boat: traffic_Ships_Africa_Somalia_49005.bgl
        FP is boat: traffic_Ships_Asia_Dalian_73160.bgl
        FP is boat: traffic_Ships_Arabia_Dubai_50942.bgl
        FP is boat: traffic_Ships_Asia_Malacca_73804.bgl
        FP is boat: traffic_Ships_Arabia_Kuwait_50948.bgl
        FP is boat: traffic_Ships_Asia_HK_Bulk_30320.bgl
        FP is boat: traffic_Ships_Arabia_Ras_Tanura_50934.bgl
        FP is boat: traffic_Ships_Africa_Cape_Town_73189.bgl
        FP is boat: traffic_Ships_Asia_Osaka_Tanker_30348.bgl
        FP is boat: traffic_Ships_Asia_Malaysia_56532.bgl
        FP is boat: traffic_Ships_Asia_Fuzhou_73195.bgl
        FP is boat: traffic_Ships_Arabia_Pirate_50966.bgl
        FP is boat: traffic_Ships_Africa_Somalia_49003.bgl
        FP is boat: traffic_Ships_Asia_Samui_74052.bgl
        FP is boat: traffic_Ships_Arabia_Bahrain_50938.bgl
        FP is boat: traffic_Ships_Arabia_Bahrain_73101.bgl
..

This goes on for over 2100 lines and adds about 7 minutes to the startup time alone

Kaiii3

GAIST is excluded via Code from beiing scanned. Do you have a modified manifest.json for the package?

jstnj

Quote from: Kaiii3 on March 19, 2022, 07:48:31 AMGAIST is excluded via Code from beiing scanned. Do you have a modified manifest.json for the package?

nope, untouched

Kaiii3

hmm, then something has changed inside the file. Can you upload it here?

onkeldok

perhaps GAIST is no longer excluded because it has a new name and a new folder?


Collect flightplans from: D:\Community\gaist-ultra-BETA\Scenery

Kaiii3


onkeldok


Kaiii3