Skip to content

"Fix" performance drop caused by changing scroll speed#37149

Merged
peppy merged 4 commits intoppy:masterfrom
austin19moore:37042
Mar 31, 2026
Merged

"Fix" performance drop caused by changing scroll speed#37149
peppy merged 4 commits intoppy:masterfrom
austin19moore:37042

Conversation

@austin19moore
Copy link
Copy Markdown
Contributor

@austin19moore austin19moore commented Mar 29, 2026

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

@bdach
Copy link
Copy Markdown
Collaborator

bdach commented Mar 30, 2026

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.

@peppy
Copy link
Copy Markdown
Member

peppy commented Mar 30, 2026

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;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

@austin19moore austin19moore Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Comment on lines 144 to 146
protected override void Update()
{
base.Update();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

override can be removed now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 30, 2026
@peppy peppy self-requested a review March 31, 2026 07:30
@peppy peppy changed the title Fix performance drop caused by changing scroll speed during a Mania song "Fix" performance drop caused by changing scroll speed Mar 31, 2026
@peppy peppy merged commit cbcbc78 into ppy:master Mar 31, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing scroll speed in map causes huge FPS drop

3 participants