Preload song select instances in multiplayer / playlists
RFC.
Off the back of some very old feedback: https://www.reddit.com/r/osugame/comments/1dga6m5/comment/l8ot8qy/
Maybe resolves some of https://github.com/ppy/osu/issues/21952, too (definitely not all of it, state is still lost even with this).
Mirrors the setup MainMenu does. It's not really possible to just keep one instance around since ScreenStack protests when trying to push an already-loaded screen.
Results in testing with a few huge databases are... not as good as I'd hoped, but if given enough time to preload, it is better, so maybe fine? Anything more complex than this is probably going to be painful.
This is a bit ugly IMO.
I gave the proposal I made on discord a try and it's pretty low effort: https://github.com/ppy/osu/compare/master...peppy:osu:detached-beatmap-cache?expand=1
Remaining work is to tidy up the subscription in BeatmapCarousel (may be able to remove completely and use BindableList collection changed flow instead).
I'm willing to give this a bit more time since I'm pretty familiar with the code, but will wait for feedback on direction first.
I... have questions to that diff.
- Why is
GetDetachedBeatmaps()on a 10s timeout after which it just fails? - I'd hope the detach can be done in a smarter manner rather than detaching the entire collection of beatmaps on every single change?
If that is the "tidy up" you mention, then that may be an okay direction to explore.
Why is GetDetachedBeatmaps() on a 10s timeout after which it just fails?
Don't dwell on it, just banned symbols.
I'd hope the detach can be done in a smarter manner rather than detaching the entire collection of beatmaps on every single change?
The next step would be moving the two subscriptions and only detaching / updating changes, which is basically what BeatmapCarousel already does. Just a matter of only moving across the part which matters here (and see if we still need the subscriptions in BeatmapCarousel anymore).
Sure, sounds like a plan.
@bdach i still need to do a sanity and test pass, but how is this looking for you now? https://github.com/ppy/osu/compare/master...peppy:osu:detached-beatmap-cache?expand=1
Seems better on a quick look. Haven't looked too closely at it though, just skimmed the diff.