Open friznit opened 5 years ago
Have reviewed the simulation code and there doesn't appear to be any needless garbage generation there. All loops are done with numeric iterator constraints, no new objects are allocated on the heap, all references are cached were possible.
Quite possible that the issue is with the dust and sound code (more likely the dust part...). Doesn't look like I'll be able to get it cleaned up for the next release, but I will spend some time investigating the source of this issue in the near future.
One thing that might help -- you might try disabling dust-effects in the in-game KSPWheel settings; might mitigate the problem, or at least give some confirmation as to its location.
Turning off dust effect didn't help much.
Thanks for the info. Will put that to use during my investigations (which will hopefully be sooner rather than later...).
Running mem graph shows the mono heap allocation spiking when parts from these mod load into the world and the garbage collection subsequently runs every 10 seconds or so, causing a periodic "stutter" (it's unity doing its thing). I can't see anything related in the logs, though I'm not an expert - log attached for reference. It doesn't really manifest when running the mods alone, presumably as there's sufficient overhead to cover it, but when you add in a couple of parts/graphics/life support things tank rapidly. KSP.log