Hey WingC3. Thanks for testing it! This is a problem and I am wondering how to approach this. You must have a lot of scenario files in your scenario folder.
Turns out that when Orbiter saves state, it's currently scanning the entire scenario directory, and if you have a lot of files in there, it causes a slight stutter everytime oapiSaveState
is called (currently every 5 seconds).
This problem is fixed in Open Orbiter... so that's the good news. If you move the scenario files out of the Scenarios folder, it "fixes" the stutter.
What do you think would be a good compromise? No animations for Orbiter 2016? I can have it automatically move the scenario files out of the
Scenarios folder and then move all of them back when you're done but that seems crude.
I'm slightly confused: I understand what you're saying about api calls by Orbiter to save its state, and yes, I have lots of scenario files.
What I'm not understanding is how this is interacting with your plugin.
Your answer implies that you are calling this state saving function in a way that it isn't normally used (since I don't have the stutter normally) in order to gain information about the other vessels in the scenario.
1. Is that the only way to get that information?
2. If that is indeed what you're using it for, does it need to be called multiple times or only on client connect? Players don't usually change the craft in their scenario whilst in flight. They can, but they generally don't. For Orbiter2016, this might mitigate the issue. For OOx86, you could leave it as is if it doesn't have the same impact.
I wouldn't start moving people's scenario files around. It only has to go wrong once for someone, and you'll have some very unhappy users.