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

Fix #55: Add ProgressTrackingSpeedBoost #57

Merged
merged 1 commit into from
Jul 13, 2022
Merged

Fix #55: Add ProgressTrackingSpeedBoost #57

merged 1 commit into from
Jul 13, 2022

Conversation

JonnyOThan
Copy link
Contributor

KSP's stock ProgressTracking evaluates every progress node for every vessel in the universe.
There are ~19 progress nodes per celestial body, and this can get extremely expensive for mods with a
large number of bodies or saves with a large number of vessels.
This tweak only evaluates the currently active vessel and removes the per-body checks which don't
have any effect, at least in the stock game.

KSP's stock ProgressTracking evaluates every progress node for every vessel in the universe.
There are ~19 progress nodes per celestial body, and this can get extremely expensive for mods with a
large number of bodies or saves with a large number of vessels.
This tweak only evaluates the currently active vessel and removes the per-body checks which don't
have any effect, at least in the stock game.
@gotmachine
Copy link
Contributor

Evaluating only the active vessel would be a breaking change, not only for "world firsts", but also for contracts.

The part about removing the per body update delegate feels alright. Not 100% safe, but I doubt anybody ever added custom tracking nodes.

@JonnyOThan
Copy link
Contributor Author

I’ll do a more diligent search…I’m pretty sure all the contract related stuff is not things that are handled by OnVesselIterate

@JonnyOThan
Copy link
Contributor Author

JonnyOThan commented Jul 12, 2022

Confirmed: Every stock class that populates the OnIterateVessels callback only looks at the active vessel inside the callback.

For example: CelestialBodyFlyby operates by handling the OnVesselSOIChange event, not by using OnIterateVessels.

@gotmachine
Copy link
Contributor

Ok, did a quick review of the ContractConfigurator codebase too, couldn't find anything that might be affected.
Also found a bunch of other mods manipulating ProgressTracking stuff in a way or another, but it doesn't seem any of them is relying on IterateVessels callbacks.

Will merge for next release, thanks for the contribution.

@gotmachine gotmachine merged commit f1dfc55 into KSPModdingLibs:dev Jul 13, 2022
@JonnyOThan JonnyOThan deleted the fix-progress-tracking branch July 13, 2022 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants