Fix beatmap carousel performance regression with large databases #28946
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.
The main fix here is avoiding running
Detach
in the update thread.This was incorrectly added in this call..
osu/osu.Game/Screens/Select/BeatmapCarousel.cs
Line 287 in 123d3d2
..in an attempt to handle realm subscription resetting better. While fixing this I have been testing blocking realm with song select open. This was causing deadlocks.
Let me first preface a user should never get into this state. Game-wide realm blocking is done from the main menu in all cases, not song select. But while I was here I wanted to fix this.
The simplest fix is to not handle the "blocking happened, clear everything" and just wait for the operation restoration to come in. The clear operation causes an ungodly event flow which eventually hits a blocking realm operation:
Hopefully the inline comments explain this amicably.
Closes #28929.