1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 16:47:29 +08:00
osu-lazer/osu.Game.Rulesets.Taiko
Bartłomiej Dach f13ca28d5e
Fix performance overhead from ternary state bindable callbacks when selection is changing
Closes https://github.com/ppy/osu/issues/28369.

The reporter of the issue was incorrect; it's not the beat snap grid
that is causing the problem, it's something far stupider than that.

When the current selection changes,
`EditorSelectionHandler.UpdateTernaryStates()` is supposed to update the
state of ternary bindables to reflect the reality of the current
selection. This in turn will fire bindable change callbacks for said
ternary toggles, which heavily use `EditorBeatmap.PerformOnSelection()`.

The thing about that method is that it will attempt to check whether any
changes were actually made to avoid producing empty undo states, *but*
to do this, it must *serialise out the entire beatmap to a stream* and
then *binary equality check that* to determine whether any changes were
actually made:

	7b14c77e43/osu.Game/Screens/Edit/EditorChangeHandler.cs (L65-L69)

As goes without saying, this is very expensive and unnecessary, which
leads to stuff like keeping a selection box active while a taiko beatmap
is playing under it dog slow. So to attempt to mitigate that, add
precondition checks to every single ternary callback of this sort to
avoid this serialisation overhead.

And yes, those precondition checks use linq, and that is *still* faster
than not having them.
2024-06-04 10:32:12 +02:00
..
Beatmaps Remove unnecessary prefix 2023-12-06 22:00:35 +09:00
Configuration Removed unnecessary directives that were added automatically and I forgot to remove 2023-01-10 12:44:27 +00:00
Difficulty Fix taiko legacy score simulator not including swell tick score gain into bonus portion 2024-03-25 19:09:38 +01:00
Edit Fix performance overhead from ternary state bindable callbacks when selection is changing 2024-06-04 10:32:12 +02:00
Judgements Automated pass 2023-06-24 01:00:03 +09:00
Mods change multiplier to 0.9x 2024-03-08 16:01:57 +01:00
Objects Apply further changes to remove remaining weirdness 2024-02-05 13:37:38 +01:00
Properties Automated pass 2023-06-24 01:00:03 +09:00
Replays Use AsNonNull() instead. 2022-07-02 19:48:32 +08:00
Resources Add conversion tests 2023-02-09 23:23:58 +01:00
Scoring Fix back-to-front conditional in taiko processor 2024-01-22 19:57:12 +01:00
Skinning Share scale factor with hit target 2024-05-27 14:20:28 +09:00
UI Merge pull request #27341 from Hiviexd/taiko-constant-speed-mod 2024-05-23 21:01:53 +09:00
osu.Game.Rulesets.Taiko.csproj Upgrade to .NET 8 SDK 2024-02-02 21:28:51 +09:00
TaikoInputManager.cs Automated pass 2023-06-24 01:00:03 +09:00
TaikoRuleset.cs Merge pull request #27341 from Hiviexd/taiko-constant-speed-mod 2024-05-23 21:01:53 +09:00
TaikoSettingsSubsection.cs localise remaining parts of the game settings 2024-02-03 00:08:36 +03:00
TaikoSkinComponentLookup.cs Remove unused members from GameplaySkinComponentLookup 2024-04-19 18:03:13 +09:00
TaikoSkinComponents.cs Move DrumSamplePlayer to be a skinnable component 2023-07-05 18:44:27 +09:00