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

Rate of garbage collection in KSP is highly increased #8

Open
marsfan opened this issue May 18, 2018 · 5 comments
Open

Rate of garbage collection in KSP is highly increased #8

marsfan opened this issue May 18, 2018 · 5 comments

Comments

@marsfan
Copy link

marsfan commented May 18, 2018

Upon installing this mod in KSP 1.4.3, the rate at which the game initiates garbage collections is highly increased, resulting in a stuttering gameplay.

Mods Installed:

  • Module Manager
  • Commnet Constellation
  • memgraph

Memgraph is not needed, I just used it to verify details. This glitch occurs even if memgraph is uninstalled.

Procedure:

  1. Install aforementioned mods (via either spacedock or CKAN, it happens on both)
    2, Launch a save
    3, Build a simple rover of any design
    4, Launch onto runway.

When CNC is the only mod installed, the pause caused by garbage collection is manageable, but as the number of mods installed increased, the garbage collection happens even more frequently, and it pauses for longer. Without CNC, pauses occurred roughly every 30 seconds
screenshot14
With just CNC, they occurred around every 12 seconds, and were slightly noticeable.

screenshot12

With a large number of other mods installed, the pauses were highly noticeable and occurred every 5 seconds. I do not have a screenshot of this ATM unfortunately. I understand that other mods exacerbate this issue, but removing CNC greatly decreased the rate at which this happened and for how long it paused.

Additionally, with only memgraph installed, each refresh of the graph shows a 1MB increase in current memory, while with CNC installed as well it can increase as much as 5MB each refresh. I suspect some memory leak is causing the GC to trigger more often.

@KSP-TaxiService
Copy link
Owner

KSP-TaxiService commented May 18, 2018

I noticed this in my old personal session too. Somehow, my CommNet instance running worse than stock CommNet on the same data.

I plan to try to re-organise and streamline the whole network process of CNC later. This may have unacceptable implications for the CommNet-based RemoteTech 2 redevelopment if I can't maintain the performance of relatively simpler CNC.

@KSP-TaxiService
Copy link
Owner

@marsfan Actually, I would like to know what you did during the mesurement of memgraph on the rover. Did you open up any CNC interface or move the rover around. Or was it simple do nothing for whole duration?

It will help to narrow down to the problematic area of CNC.

@marsfan
Copy link
Author

marsfan commented May 20, 2018

@KSP-TaxiService I did absolutely nothing, It just happens all the time.

Some more info I remembered:

  • Though I have not showed it, it also occurs on the building selection screen.
  • I have not noticed it one I am at a high altitude or in orbit. I might just be more focused on other stuff though, or my memory is slipping.

Thanks for being proactive about this.

@KSP-TaxiService
Copy link
Owner

This issue will be left open for further optimization rounds and discussion.

Do reach me if you have any further concern on the mod performance.

KSP-TaxiService added a commit that referenced this issue Nov 10, 2019
@R-T-B
Copy link

R-T-B commented Jan 28, 2024

The performance in the recent beta builds is far worse, if I take release 1.5.7 and just add commits

e6b5d77

098e329

Then I get decent performance and no nullrefs. Attatching in case someone finds it useful, no plans to maintain it unfortunately. Source is the same just cherry picked commits as mentioned,

CommNetConstellationPatched_v1.5.7.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants