savestate very slow on beta

patio

Member
Joined
Sep 13, 2011
Messages
10
Reaction score
5
Points
18
hi,

am I the only one experiencing very slow savestate with orbiter beta ?
for me it seems to freeze the sim for something like 3 seconds

thanks
 

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
659
Reaction score
151
Points
58
Location
This place called "home".
Are you talking about the StateSaver addon, or normal quick saving in Orbiter (Ctrl+S)?

Since Orbiter 2016, Orbiter saves a screenshot when saving a scenario. This screenshot process takes a second to capture, and may be what you're experiencing.

If I recall correctly, you can disable this screenshot in the Extra tab in the Orbiter Launchpad. Maybe it saves quicker then.
 

patio

Member
Joined
Sep 13, 2011
Messages
10
Reaction score
5
Points
18
I am talking about normal quick saving (CTRL-S)

disabling the screenshot changes nothing, still slow
 

GLS

Addon Developer
Addon Developer
Joined
Mar 22, 2008
Messages
4,293
Reaction score
485
Points
108
Does this happen in any scenario, or only with a specific addon?
Also, could it be an anti-virus doing a scan on the new save scenario file?
 

N_Molson

Addon Developer
Addon Developer
Donator
Addon List Curator
Joined
Mar 5, 2010
Messages
7,547
Reaction score
689
Points
188
Location
Toulouse
Orbiter has to read through the list of all the filenames before it saves.

I wasn't even aware of that.

A "delete quicksaves after n saves" script could be useful then... :unsure:
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,653
Reaction score
170
Points
63
The size of the quicksave files also depends on the vessels currently present.
A scenario running SSU for example results in a much bigger savestate.
3 seconds however is quite slow, even with a large savestate.
My first guess would be the anti-visus scan, though
 

patio

Member
Joined
Sep 13, 2011
Messages
10
Reaction score
5
Points
18
After testing, I can confirm that both beta and orbiter2016 released version are indeed very sensitive to the number of files you have in the Scenarios folder
and not just in the Quicksave folder
I had a subdirectory in the scenarios folder with 400 saved files and removing it did changed completely the performance of quick saving
It seems that orbiter 2016 indeed scans not only the quicksave but also the full Scenarios directory tree

I saw the same performance problem using the sdk
OAPIFUNC bool oapiSaveScenario (
const char fname,
const char desc )
function

I still do not understand exactly why orbiter is scanning outside of the quicksave folder

Thanks everyone for the answers
 

N_Molson

Addon Developer
Addon Developer
Donator
Addon List Curator
Joined
Mar 5, 2010
Messages
7,547
Reaction score
689
Points
188
Location
Toulouse
I'd say the quicksave option was something added by popular demand, and that Martins didn't specifically design the parser to deal with that. Remember that the oldest sections of the code are from 2000 or 2001.

Edit : now if it happens only on 2016 beta then there's probably something funny going on, yes, after all it is WIP...
 

patio

Member
Joined
Sep 13, 2011
Messages
10
Reaction score
5
Points
18
no finally It is not only the beta
same behaviour on orbiter 2016 released version
I did not test on orbiter 2010
 

N_Molson

Addon Developer
Addon Developer
Donator
Addon List Curator
Joined
Mar 5, 2010
Messages
7,547
Reaction score
689
Points
188
Location
Toulouse
Found this on "ScriptPB.cfg" in Orbiter 2016 beta, I think there might be something there, though I haven't tested it :

; Example for a script-driven vessel class definition.
; For implementation code, see Orbitersdk/samples/ScriptVessel
; This file contains both the configuration and script parts.
; The config part is terminated by 'END_PARSE' to prevent the
; Orbiter parser from reading the script, and enclosed in Lua
; comment brackets to make it a comment for the script interpreter.

So if you add "END_PARSE" in any config or scenario file, Orbiter will ignore it ?

Might be useful for archiving old scenarios you don't want to delete ? And possibly improving the parsing time, because "parsing time" is obviously the issue in the OP ?
 

patio

Member
Joined
Sep 13, 2011
Messages
10
Reaction score
5
Points
18
the behaviour was exactly the same with orbiter 2010 actually

You definitely need to clean up your Scenarios folder and subfolders if you want to quicksave with no lag
 
Top