1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 02:11:05 +08:00
Commit Graph

31 Commits

Author SHA1 Message Date
OliBomby
fcc8671cbd undo useless change 2024-06-06 14:50:24 +02:00
Bartłomiej Dach
86b13074a0
Merge branch 'master' into edit-nodesample 2024-06-06 13:42:25 +02:00
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
Dean Herbert
f06b203067
Merge branch 'master' into edit-nodesample 2023-07-31 14:06:38 +09:00
Dean Herbert
0ab0c52ad5 Automated pass 2023-06-24 01:00:03 +09:00
Dean Herbert
114f12a790 Adjust CreateHitSampleInfo to handle additions correctly, rather than implementing locally 2023-05-30 14:04:02 +09:00
Dean Herbert
4a81d068af Merge branch 'master' into edit-nodesample 2023-05-30 14:03:43 +09:00
Dean Herbert
1e14b02493 Fix bindable feedback loop 2023-05-25 17:58:38 +09:00
Dean Herbert
3a05dffa50 Add "auto" bank selection during placement 2023-05-24 17:11:12 +09:00
Dean Herbert
a9ba16a2be Update to support non-control-point sample changes 2023-05-24 14:20:38 +09:00
Dean Herbert
298989ffd2 Merge branch 'master' into sample-set-controls 2023-05-24 14:03:04 +09:00
Dean Herbert
dc51d5ecf3 Rename GetSampleInfo to better describe what method does
Also add full xmldoc
2023-05-17 14:07:48 +09:00
Dean Herbert
d9ae822966 Fix bank not correctly being assigned when adding sample additions in editor 2023-05-16 18:52:52 +09:00
OliBomby
dd0fceaec6 add addition bank 2023-05-08 16:12:03 +02:00
OliBomby
88d840a60d fix assigned hitsounds dont have bank or volume 2023-05-08 14:42:15 +02:00
Dan Balasescu
7bc8908ca9 Partial everything 2022-11-27 00:00:27 +09:00
Dean Herbert
50e24ddd87 Add icon and radio button logic 2022-10-19 21:35:08 +09:00
Dean Herbert
9222cb379f Add sample bank suport to editor selection handler 2022-10-19 20:53:18 +09:00
Dean Herbert
31a447fda0 Update parameter discards 2022-06-24 21:26:19 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
68aedd63a7 Move SelectionHandler's SelectedItems binding to the base implementation
Until now it was up to each implementation to connect
`BlueprintContainer` to its `SelectionHandler`, which didn't make much
sense at all.
2022-03-10 23:22:19 +09:00
Dean Herbert
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Dean Herbert
4c9d72e62a Ensure EditorBeatmap.Update is called inside PerformOnSelection calls 2021-05-23 21:22:35 +09:00
Dean Herbert
df5970fab4 Create base implementations of the two most common TernaryStateMenuItems 2021-05-20 19:34:53 +09:00
Dean Herbert
01984de9c7 Use existing GetStateFromSelection helper function 2021-05-03 15:13:32 +09:00
Dean Herbert
4c9e94da2b Move context menu logic to base class 2021-04-28 13:43:16 +09:00
Dean Herbert
aa1cb65eaa Rename region to be more inclusive 2021-04-28 11:42:22 +09:00
Dean Herbert
f97b14a20a Fix binding direction of selected items 2021-04-27 19:01:29 +09:00
Dean Herbert
dd3d8e5d03 Make SelectionHandler abstract to ensure things get implemented 2021-04-27 19:01:29 +09:00
Dean Herbert
32416e4e31 Move model selection handling to base SelectionHandler class 2021-04-27 19:01:29 +09:00
Dean Herbert
f2e56bd306 Refactor editor selection/blueprint components to be generic 2021-04-27 19:01:29 +09:00