Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive Mono Heap Allocation #64

Open
3 tasks done
friznit opened this issue Dec 19, 2018 · 3 comments
Open
3 tasks done

Excessive Mono Heap Allocation #64

friznit opened this issue Dec 19, 2018 · 3 comments

Comments

@friznit
Copy link

friznit commented Dec 19, 2018

  • KSP Version 1.5.1
  • Tested in Vanilla (running only Foundries & KSPWheel with Mem Graph)
  • Logs attached

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

@shadowmage45
Copy link
Owner

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.

@HorusAK
Copy link

HorusAK commented Jan 30, 2019

Turning off dust effect didn't help much.

@shadowmage45
Copy link
Owner

Thanks for the info. Will put that to use during my investigations (which will hopefully be sooner rather than later...).

@shadowmage45 shadowmage45 transferred this issue from shadowmage45/KerbalFoundries2 Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants