Skip to content

Excessive logging in open source tech program strategy causes stuttering #354

@Phantomical

Description

@Phantomical

Source: https://forum.kerbalspaceprogram.com/topic/204002-18-112-kspcommunityfixes-bugfixes-and-qol-tweaks/page/35/#findComment-4500445

One thing that I have noticed is that, in career mode with a strategy that converts one resource to another automatically (e.g., Open-Source Tech Program converting science to reputation), for some reason it will trigger a rather useless log entry every time that there is a "state" change, giving a line such as this:

[CurrencyConverter for Open-Source Tech Program]: 0 Science taken, yields 0 Reputation

This causes a very slight lag spike. The problem? This happens even when you have a kerbal on EVA, and if you are on a low-gravity body like the Mun, where each step causes the Kerbal to technically count as "flying" for a split second, it will trigger every. single. time.

I figured this out when, after getting annoyed by the inexplicable stuttering every time I tried walking around, opened the console, and noticed that line being added every time I took one step forward. Occasionally, about a dozen of these lines will just trigger for no perceptible reason, sometimes happening a few seconds after I stop walking. I determined that this is not due to it auto-saving, as there are no "Game State Saved" messages in console nor in the KSP.log file to reflect this.

In the meantime, it appears that the only way to get this to stop is to simply not use these strategies. That is quite frustrating, as these can be incredibly useful for career mode, and I'd rather not have to be forced to decide between managing finances or having a steady framerate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kspPerformancePossible performance improvement in KSPup-for-grabsWon't be worked on, but contributions are welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions