-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Preliminary fixes for off-the-charts allocations #26422
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
02a4a3e
to
962c8ba
Compare
bdach
requested changes
Jan 8, 2024
b99c9ab
to
765d41f
Compare
Just as a heads up my OP diff is incomplete. I'll post an updated one when I'm at my other PC, if required. |
Fixed a few more missing wireframes, rest seems fine |
bdach
approved these changes
Jan 9, 2024
build canceled because github actions is dying of death, i intend to wait for recovery |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
next release
Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees!
size/L
type:performance
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are just initial clean-ups to get them out of the way. I have more follow-up PRs incoming. The hope is that the changes in this PR should be very low-effort review/acceptance. I've saved anything which could cause issues for separate PRs.
And in case anyone wonders why I'm spending time on this, the reason is that there have been enough reports of stuttering in recent times to become concerning to me. During investigation I have been able to reproduce and it is related to GC. We have regressed heavily on allocations both due to new components and more animations than before. Currently we are doing 200k obj allocations per second during gameplay with argon. My immediate goal is to reduce that down by at least 90%.
Note that I am not paying any attention to allocation size, only object counts for now.
Testing done using dotmemory with a temporary project. I tried to hook dotmemory up to unit testing but I don't think it works on macOS / rider yet.
framework:
Red underlines show the overhead removed by the commit written below. Note that the total objects allocated is misleading as I was doing 5 second time samples, and as I optimised the whole tests would run faster.
91bb3f6 Cache argon character glyph lookups to reduce string allocations
5b55ca6 Cache legacy skin character glyph lookups to reduce string allocations
e9289cf Reduce precision of audio balance adjustments during slider sliding
b809d4c Remove delegate overhead from argon health display's animation updates
Note that I pulled part of the change I had here because I'll be addressing in a separate pull.
9d9e6fc Remove LINQ calls in hot paths
35eff63 Remove unnecessary second iteration over
NestedHitObjects
5cc4a58 Avoid iteration over
NestedHitObjects
in silder'sUpdate
unless necessary16ea7f9 Avoid completely unnecessary string allocations in
ArgonCounterTextComponent
(framework input sampler api change)