KSP-X-Science icon indicating copy to clipboard operation
KSP-X-Science copied to clipboard

Lag/stutter with windows open

Open JohnHestehave opened this issue 7 years ago • 4 comments

Whenever one of the windows are open, the game will freeze for a moment every time there is an update to the X Science UI (Such as entering a new biome, running an experiment and/or hitting reset).

Edit 1: After debugging the code via the source, I've come to the conclusion that the issue lies in the ScienceInstance.Update() method, which is called from ScienceContext.UpdateAllScienceInstances(). In the for loop that is running, it's updating around 2880 objects which results in a freeze of around 300ms.

Edit 2: Further testing shows that "ScienceSubject = new ScienceSubject(ScienceExperiment, Situation.ExperimentSituation, Situation.Body.CelestialBody, Situation.SubBiome ?? Situation.Biome ?? string.Empty);" is what's causing the freeze.

JohnHestehave avatar Sep 11 '17 12:09 JohnHestehave

Got the same problem. Have RO installed, if that matters.

MikeOnTea avatar Jan 10 '18 19:01 MikeOnTea

same issue. its not game stopping, just bothersome

john-TC avatar Jan 27 '18 23:01 john-TC

https://forum.kerbalspaceprogram.com/index.php?/topic/107661-ksp-131-x-science-ksp-science-report-and-checklist-v511/&page=25&tab=comments#comment-3289540 try out the .dll here, but watch for updates :)

Bornholio avatar Feb 10 '18 14:02 Bornholio

Any progress on this, its pretty serious in RP-0 to the point of almost unusability. Seems like its scanning every possibility and give the large number of total biomes an multiple levels of many science missions to run the mod is locking up the game at any change.

Bornholio avatar Oct 09 '18 01:10 Bornholio