Add HighPerformanceSession and use LowLatency GC in gameplay #13525
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.
Slightly adapted from #11996. Exposes virtual methods for the PR to eventually override, and to potentially support different "high performance" profiles on mobile devices.
In debugging GC stutters, I noticed that using
LowLatency
GC mode yields better frame consistency in cases where we're not allocating very much (i.e. basically only in gameplay). This is also what osu!stable does, however it also allocates 10x less than we currently are - a good goal to aim for in any case.Here's some graphs to look at: https://docs.google.com/spreadsheets/d/1ZJLe61ay_O1JT1EbpphQcGpKdaoYro2jR_WOkecfyB8/edit#gid=0
I'm still following up with the .NET team in dotnet/runtime#48937, but this should serve as a good test for the time being.
Only has an effect if the local user is playing. Has no effect in replays.