ppy / osu

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

Game stutters on the first pooling when using skins with absurdly large sprites #11966

Open SysError99 opened 3 years ago

SysError99 commented 3 years ago

This only happens on Mania and Taiko mode when using quite heavy skins, and only happen once each time have launched the game. I found it to happen more frequently on low-end platforms too, but never captured the evidence. GC seems to be messed up when out of VM memory in my suspects.

Video of Mania mode (YouTube): osu! bug video, shows sign of lagging on hugely-customized beatmaps

Video of Taiko Mode: osu! bug video, shows sign of lagging on hugely-customized beatmaps

But it seems to not be the case in following modes:

osu! mode (YouTube): osu! normal mode, shows no signs of issues

osu!CTB mode (YouTube): osu! catch the beat mode, shows no signs of issues

osu!lazer version: 2021.302.0 AppImage Platform: Linux 5.10.15-1 MANJARO, NVIDIA Prime 455, KDE Plasma Desktop 5.20.5

Logs:

Skin: Here (SHA1: eddf77c887d3e0a700ab1e680b011cff83926e6a ./MyMergedSkin.osz)

peppy commented 3 years ago

Firstly, osu!mania has not yet received a pooling pass so it is not optimised. Please test using another ruleset for performance testing.

Secondly, we cannot help unless you attach the skin you are using. Along with log files as requested by the template (please read it again).

SysError99 commented 3 years ago

Updated issue with logs, skin, and additional mode tests.

Yes, it does happen on Mania and Taiko mode.

bdach commented 3 years ago

Overall the skin has some rather huge sprites in non-pooled components which hold up the game thread. In the taiko case it's hit explosions in particular which are not pooled yet, and will load slowly on first appearance.

As for mania, I think it'll be the miss animation. That said mania should probably be re-evaluated after pooling is in.

bdach commented 3 years ago

As a heads up, I have some changes mostly ready that add hit explosion pooling for taiko, which should alleviate the problem there (as long as skins aren't changed during gameplay). I'll hopefully be PRing them in the coming days, just want to take another look at what I have tomorrow with a fresh head, as getting everything to work correctly was quite finicky.