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

Rework tank UsedBy logic #342

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Rework tank UsedBy logic #342

merged 1 commit into from
Sep 15, 2024

Conversation

siimav
Copy link
Contributor

@siimav siimav commented Aug 28, 2024

Resolves #310

When loading a 116 part vessel I saw 1456 (!!!!1one) calls to UpdateUsedBy(), taking 912ms. This PR rewrites the logic to happen in a couroutine at the end of frame and process all parts in a single run, taking just 21ms. The scaling with part count should now be linear whereas before it got slower exponentially.

Copy link

github-actions bot commented Aug 28, 2024

Download the artifacts for this pull request:

@siimav siimav merged commit 0829f66 into master Sep 15, 2024
3 checks passed
@siimav siimav deleted the TheSpamIsUnreal branch September 15, 2024 21:49
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

Successfully merging this pull request may close these issues.

Optimize UpdateUsedBy
1 participant