osu/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
Configuration
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
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
Replays
Resources
Scoring
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
TaikoInputManager.cs
TaikoRuleset.cs Merge pull request #27341 from Hiviexd/taiko-constant-speed-mod 2024-05-23 21:01:53 +09:00
TaikoSettingsSubsection.cs
TaikoSkinComponentLookup.cs Remove unused members from GameplaySkinComponentLookup 2024-04-19 18:03:13 +09:00
TaikoSkinComponents.cs
osu.Game.Rulesets.Taiko.csproj