FractalUK / KSPInterstellar

KSP Instellar Mod for Kerbal Space Program
115 stars 67 forks source link

Move PluginHelper.getPluginSaveFile() outside loop #20

Open willglynn opened 10 years ago

willglynn commented 10 years ago

I'm noticing a significant performance degradation as my career-mode game progresses. This may not be related, but at the very least we don't need to parse the config file once per vessel per microwave receiver.

Joeppie commented 10 years ago

I have had the same issue. I was suprised to find a new non-carreer game having much better performance all-round. This definitely should be considered.

williamh42 commented 9 years ago

I just submitted a pull request for another career mode slowdown related to checking for techs for upgrades that is similar to this - glancing at this it looks like this bug could be even more thoroughly squashed (with a substantial performance improvement) by simply caching the ConfigNode and only reading it in if the cached object is for some reason destroyed - from what I can tell the plugin save file shouldn't ever be modified by anything other than KSPInterstaller's own code correct? I might try that myself unless someone knows of a problem that might cause...

Either way this is a good, and very simple fix.

Boris-Barboris commented 9 years ago

https://github.com/FractalUK/KSPInterstellar/pull/72

Spent a couple of hours on microwave code refactoring. There is no need now in FS operations at all.