"Fix" performance drop caused by changing scroll speed#37149
"Fix" performance drop caused by changing scroll speed#37149peppy merged 4 commits intoppy:masterfrom
Conversation
|
This also affects the "show speed changes" toggle in editor which no longer animates the change but instead changes time range instantaneously. Going to need @peppy and maybe @smoogipoo sign-off on going forward with any of this since I have a suspicion this is not going to be accepted as-is on account of being a rather major visual regression. |
|
Honestly I'm fine with this. The animation was kind of cool but I'd rather nuke it than spend time fixing performance on something like this for now. |
| { | ||
| base.Update(); | ||
| updateTimeRange(); | ||
| TimeRange.Value = TargetTimeRange; |
There was a problem hiding this comment.
Surrounding code could do with a clean-up, rather than just dropping this in Update. TargetTimeRange variable probably doesn't make as much sense anymore.
There was a problem hiding this comment.
Removed TargetTimeRange and used direct assignment to TimeRange.Value instead. I reused the CurrentTimeRange variable for accessing the protected TimeRange.Value inside of TestSceneScreenNavigation.cs. commit
…sor instead for test, TimeRange.Value assignment otherwise.
| protected override void Update() | ||
| { | ||
| base.Update(); |
The fix is just disabling the animation. It works I guess.
Currently in Mania, you can change the scroll speed for a brief period during the beginning of a song. However this scroll speed change occurs over a short period of time, which causes a bunch of extra hit object updates, causing major fps and latency drops.
This fix simply replaces the dampening with an immediate scroll speed update. Since the scroll speed can only be updated for a short time at the beginning of the song, providing immediate visual feedback on the scroll speed makes sense to me. However another potential solution would be to filter the TimeRange Value updates to keep the gradual scroll speed visual change, while greatly reducing the number of updates to the hit objects currently on screen.
If there is any feedback I would greatly appreciate it as this is my first issue here. I had ran both inspectCode.ps1 and the code formatter before creating the merge request. Thank you.
Before fix:
https://github.com/user-attachments/assets/55e30894-7341-414a-af2e-2ec051c3a252
After fix:
https://github.com/user-attachments/assets/c085d33f-c0ae-45dd-8131-e79a5682b9ca