Jump to content

SAM plugin triples X-Plane load time at startup


Geoff Lohr

Recommended Posts

I had noticed that X-Plane was taking a lot longer to load to the first menu. So I did some testing and found it was the SAM plugin.

Even on my very fast Intel 10th gen CPU running a 5 GHZ with a very fast M2 drive, it more than triples the initial X-Plane load time. 8 seconds with no SAM plugin and now 26 seconds with the SAM plugin. For those with a slower system and normal hard drive, I can imagine the overhead would be massive. Seems to be also dependent on how many sceneries you have installed.

That is a lot longer to wait every time I load X-Plane and especially if you are developing .lua scripts and going in and out all the time. That takes many minutes a day from my time and over an hour a week.

This overhead is an overhead you do not need or want and especially when you are not doing anything that uses the plugin.
It is a lot of wasted time.

So can this overhead be removed? An option added to disable what ever it is that is taking such a long time?

I have removed your plugin for now as it is slows things down way to much.

I hope you can do something about this. I have many plugins but none had large overheads as the SAM plugin except this XJet plugin which was not as long. And the skunk craft updater added two seconds to load times. Acceptable. But from 8 to 26 seconds is massive and very noticeable.

Thanks.

Link to comment
Share on other sites

That happens on initial installation because we read the entire default airport file and set up our definitions for taxiways etc. Once that database is ready it will stay unless you install a new airport. That one will be added to the db file on startup. But the more SAM sceneries you have the longer the startup takes - obviously.

You can post your log from SAM/logs. It will print the times for each action. In my case it takes around 15 seconds:

 

[11.44.43] [logger:info] Logger wakes up
[11.44.43] [plugin:info] SAMv3.0.13
[11.44.43] [plugin:info] using modern driver: false
[11.44.43] [plugin:info] Removing residual temp dir...
[11.44.43] [plugin:info] Temp dir removal completed.
[11.44.43] [plugin:info] Creating temp dir...
[11.44.43] [plugin:info] Temp dir creation done.
[11.44.43] [steam:info] Initializing subsystem...
[11.44.43] [steam:critical] Can't initialize service, Steam-related functionalities will be unavailable.
[11.44.43] [steam:info] Init completed.
[11.44.45] [rest_api_service:info] starting server...
[11.44.45] [rest_api_service:info] server listening at localhost:20205
[11.44.45] [extensiondb:info] initializing...
[11.44.45] [extensiondb:info] initialization done.
[11.44.45] [extensiondb:info] active extension Plugin/Library: 3.0.7
[11.44.45] [extensiondb:info] active extension WorldJetways: 1.0.5
[11.44.45] [extensiondb:info] active extension GroundService: 0.9.3
[11.44.45] [extensiondb:info] active extension DeveloperPack: 1.0.9
[11.44.45] [extensiondb:info] active extension BetterPushback Integration: 1.0.0
[11.44.45] [airportdb:info] db initializing...
[11.44.45] [airportdb:info] loading apt files from cache...
[11.44.45] [airportdb:info] loaded 11 custom apt files from cache
[11.44.45] [airportdb:info] loading default airports...
[11.44.45] [airportdb:info] loading default airports from cache...
[11.44.45] [airportdb:info] loading airports[def_airport:] from cache...
[11.44.45] [weather:info] Loading weather data from METAR.rwx...
[11.44.45] [weather:info] Loaded weather data from METAR.rwx.
[11.44.46] [airportdb:info] loaded 37008 airports[def_airport:] from cache
[11.44.46] [airportdb:info] done loading default airports.
[11.44.46] [airportdb-loader:info] Waiting for custom scenery airport load signal...
[11.44.46] [weather:info] ActiveSky present: false
[11.44.47] [world:info] Registered and loaded flight plan DataRefs
[11.44.47] [shader:warn] Uniform uColor location not found for shader ss_line_shader
[11.44.47] [docking_controller:info] config loaded successfully
[11.44.47] [jetway_controller:info] library jetways config loaded
[11.44.47] [jetway_controller:info] initializing WorldJetways...
[11.44.47] [jetway_controller:info] WorldJetways config loaded
[11.44.58] [sound_service:info] Loading sound alarm1.ogg
[11.44.58] [sound_service:info] Sound Service no context exists
[11.44.58] [sound_service:info] Sound Service Device Loaded 0x20a38179c50
[11.44.58] [sound_service:info] Sound Service using own context 0x20a2e49c580
[11.44.58] [sound_service:info] Loading sound alarm2.ogg
[11.44.58] [sound_service:info] Loading sound ring1.ogg
[11.44.58] [jetway_controller:info] initialized successfully
[11.44.58] [follow_me:info] dexx
[11.44.58] [airport_vehicles:info] dexx
[11.44.58] [scenery:info] Scenery: Loading D:\X-Plane 11\Resources\plugins\SAM\lib\SAM_Library/sam.xml
[11.44.58] [anim_dataref:info] Publishing 'sam/library/windturbine'
[11.44.58] [anim_dataref:info] Publishing 'sam/library/hangar/door60s'
[11.44.58] [anim_dataref:info] Publishing 'sam/library/hangar/door40s'
[11.44.58] [anim_dataref:info] Publishing 'sam/library/hangar/door20s'
[11.44.58] [anim_dataref:info] Publishing 'sam/library/light/obs'
[11.44.58] [anim_dataref:info] Publishing 'sam/library/radar2s'
[11.44.58] [anim_dataref:info] Publishing 'sam/library/radar4s'
[11.44.58] [anim_dataref:info] Publishing 'sam/library/radar6s'
[11.44.58] [grnd_veh_def:error] Can't load vehicle config file 'D:\X-Plane 11\Resources\plugins\SAM\lib\SAM_GroundService\objects\default_NA\cart\container_1.xml
[11.44.58] [ground_service_veh_def:error] Can't load vehicle config file 'D:\X-Plane 11\Resources\plugins\SAM\lib\SAM_GroundService\objects\default_NA\cart\container_1.xml
[11.44.58] [grnd_veh_def:error] Can't load vehicle config file 'D:\X-Plane 11\Resources\plugins\SAM\lib\SAM_GroundService\objects\default_NA\cart\container_2.xml
[11.44.58] [ground_service_veh_def:error] Can't load vehicle config file 'D:\X-Plane 11\Resources\plugins\SAM\lib\SAM_GroundService\objects\default_NA\cart\container_2.xml
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/Limesim-EDDB-Berlin-Brandenburg-3-Airport/...
[11.44.58] [scenery:info] Scenery: Loading D:\X-Plane 11/Custom Scenery/Limesim-EDDB-Berlin-Brandenburg-3-Airport//sam.xml
[11.44.58] [anim_dataref:info] Publishing 'sam/EDDB/appch_light_strobe'
[11.44.58] [anim_dataref:info] Publishing 'sam/EDDB/hangar1'
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/SAM_TestScenery/...
[11.44.58] [scenery:info] Scenery: Loading D:\X-Plane 11/Custom Scenery/SAM_TestScenery//sam.xml
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/KMSY - New Orleans Intl/...
[11.44.58] [scenery:info] Scenery: Loading D:\X-Plane 11/Custom Scenery/KMSY - New Orleans Intl//sam.xml
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/KSEA Demo Area/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/Global Airports/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/X-Plane Landmarks - Chicago/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/X-Plane Landmarks - Dubai/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/X-Plane Landmarks - Las Vegas/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/X-Plane Landmarks - London/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/X-Plane Landmarks - New York/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/X-Plane Landmarks - Sydney/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/X-Plane Landmarks - Washington DC/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/000 Drzewiecki Design Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/3D_people_library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/Aerosoft - Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/ALES_DEV_LIB/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/BS2001 Object Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/CDB-Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/CFXP - Static Aircraft Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/Europe_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/EXTN_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/ff_library_extended_LOD/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/FJS_Scenery_Library_v1.7/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/flags_of_the_world/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/gt_library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/HungaryVFR-Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/MisterX_Library/...
[11.44.58] [scenery:info] Scenery: Loading D:\X-Plane 11/Custom Scenery/MisterX_Library//sam.xml
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/NAPS_library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/OpenSceneryX/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/Orbx_OrbxlibsXP/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/pm_library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/PPlibrary/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/PuF_Libs/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/R2_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/RA_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/RD_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/RE_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/RuScenery/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/The_Handy_Objects_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/THE-FAIB Aircraft Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/THE-FRUIT-STAND Aircraft Library v3.0/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/world-models-master/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/x_Prefab_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/ZZ_DF-Hard_Surface/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/ZZZZ_DAI Media_Library/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/california-EXTN/...
[11.44.58] [scenery_loader:info] Loading scenery D:\X-Plane 11/Custom Scenery/yOrtho4XP_Overlays/...
[11.44.58] [plugin:info] SAM plugin enabled
[11.44.59] [docking_controller:info] all marshallers object loaded

 

Link to comment
Share on other sites

I don't think that this reflects the total init time of XP because other things happen in between. 30 Seconds sounds reasonable for such a big data manager like SAM but if you want to make sure you could try booting without any other plugin except SAM to see if that improves the speed. If yes you probably have another plugin installed that is data heavy.

Link to comment
Share on other sites

I tested all plugins as my first post implies. 8 seconds with no plugins and then I added them all back in one by one.

SAM is the one and only that added massive overhead. And if something cannot be done about it, than I am not prepared to spend all that extra time waiting for it. It is not worth it. I am in and out all day as I am writing lua scripts. That time adds up even more so doing that.

You really notice 8 seconds versus 30 seconds.

Link to comment
Share on other sites

When a plugin causes such a high overhead, there is something that needs to be done. And if it can't, then yes, it should stay uninstalled. No point in having a plugin that triples the load time of X-Plane to the first menu. I do not even know why it has to do this. What do you gain for having something that slows things down so much? When I write lua scripts, I always focus on making sure that it does not slow the system down. To do otherwise is just bad programming and does not consider the user.

  • Thanks 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Don't have an account?

    An account is required to interact with and download content from the Threshold Forum.
    Forum is currently also locked down for guests because of heavy bot invasions. Sorry about that.

  • Threshold News

  • image.png.5d3ebd5638179a05dc5cfa67eaf4bf3a.png

×
×
  • Create New...

Important Information

Please read the Terms of Use