ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.29k stars 2.27k forks source link

Multiplayer song selection does not save state and is slow with a lot of maps loaded #21952

Open IceDynamix opened 1 year ago

IceDynamix commented 1 year ago

Type

Game behaviour

Bug description

Issue:

Expect:

Reproduce slow load:

  1. Load a large number of maps
  2. Open a multiplayer room
  3. Select a map and wait for the maps to load

Reproduce unsaved search/collection:

  1. Open a multiplayer room
  2. Select a map with a search filter or a selected collection
  3. Select another map, observe cleared search filter or

Extra: I think both issues can be solved in the same fix, hence putting both into a single issue.

Screenshots or videos

Slow load

https://user-images.githubusercontent.com/22303902/210096644-7c82f423-5aaf-48e8-b894-45a5cf4a851a.mp4

Search filter or selected collection not saved across map selections

https://user-images.githubusercontent.com/22303902/210096788-405cdf28-5d4c-47b9-8331-7ed7c2b3b3e0.mp4

Version

2022.1228.0-lazer

Logs

database.log input.log legacy-ipc.log network.log performance.log performance-audio.log performance-draw.log performance-input.log performance-update.log

bdach commented 1 year ago

This is happening because in single-player a single song select instance is preloaded at main menu, while online gameplay flows push new screen instances every time.

I guess a similar preload solution could be applied to multiplayer, although I'm not sure if it's going to be smooth sailing.

peppy commented 1 year ago

@bdach for some context on how i originally saw this working: screens like song select would only be instantiated once by the game, ie. we would have the ability to "suspend on exit" and then resume from this state.

If that's not feasible or seen as a good direction, then it will make sense to create a higher level component that manages the realm subscriptions so we don't have to re-query / reconstruct each time song select is loaded.