osu icon indicating copy to clipboard operation
osu copied to clipboard

Game freezes when returning to song select from results screen

Open ZaB0oo opened this issue 3 months ago • 7 comments

Type

Performance

Bug description

When returning to song select from the results screen, the game freezes for several seconds.

Screenshots or videos

https://github.com/user-attachments/assets/b3d89433-aa06-47b1-92d1-b926120e61f6

Version

Lazer 2025.912.0

Logs

compressed-logs.zip

ZaB0oo avatar Sep 26 '25 10:09 ZaB0oo

This also happens when quitting out of maps with a high diff count. A high diff count exemplifies the issue, but it probably also happens with fewer diffs to a lesser extent.

Did a git bisect and found 6e5bf57fe7918d1a12b63f9ff5da6598db823661 from https://github.com/ppy/osu/pull/34914 to be the first commit to show the issue

Map used for testing (same as video in op) https://osu.ppy.sh/beatmapsets/2377334#osu/

dani211e avatar Sep 26 '25 15:09 dani211e

I confirm that this also happens with fewer diffs (on every map actually)

ZaB0oo avatar Sep 26 '25 16:09 ZaB0oo

I can't reproduce this anymore.

@ZaB0oo @dani211e could you please test on the latest tachyon release and if you can still reproduce, please provide logs? thanks!

peppy avatar Oct 24 '25 08:10 peppy

compressed-logs.zip

There's still a noticeable freeze compared to single diff sets. Also built from a commit around the time of my first comment and the freeze length feels the same (eyeballed).

Clip from latest tachyon, fresh restart:

https://github.com/user-attachments/assets/425d48a4-eda4-4934-aaae-59eada02c126

dani211e avatar Oct 25 '25 15:10 dani211e

I can reproduce, on a large beatmap collection, with the map mentioned in the last comment, only when actually entering gameplay (won't reproduce with autoplay).

The reason why the above circumstances matter is because entering gameplay changes the map's last played date in realm, thus activating the behemoth that is beatmapSetsChanged() in song select.

Image Image

And like, yes, the commit mentioned above (https://github.com/ppy/osu/commit/6e5bf57fe7918d1a12b63f9ff5da6598db823661) would have made it worse, but like, the realm refetch is only like 30% of the synchronous, update thread overhead. So it was already pretty terrible before.

So I'm not even sure what I'm supposed to be doing about this -- making this callback async, somehow? Triggering a full blocking async refilter with a spinner showing?

A realm subscription firing off of a last played date change can't even be really ignored, because last played is a sorting mode...

Previously, once more.

bdach avatar Oct 31 '25 12:10 bdach

@bdach a lot of work was done with performance at song select, was this partially addressed in some way?

peppy avatar Dec 10 '25 09:12 peppy

No. This will not have been improved by any of the performance fixes.

bdach avatar Dec 10 '25 09:12 bdach