savestate very slow on beta

patio

Member
Joined
Sep 13, 2011
Messages
41
Reaction score
14
Points
23
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
696
Reaction score
259
Points
78
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
41
Reaction score
14
Points
23
I am talking about normal quick saving (CTRL-S)

disabling the screenshot changes nothing, still slow
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,878
Reaction score
2,870
Points
188
Website
github.com
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?
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,687
Reaction score
1,337
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
Do you have a lot of quicksaves in your quicksave folder? Iirc, Orbiter has to read through the list of all the filenames before it saves.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
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
2,064
Reaction score
507
Points
113
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
41
Reaction score
14
Points
23
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
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
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
41
Reaction score
14
Points
23
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
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
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
41
Reaction score
14
Points
23
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