1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:17:27 +08:00
Commit Graph

60 Commits

Author SHA1 Message Date
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
Dan Balasescu
6304a5ed41
Merge pull request #27341 from Hiviexd/taiko-constant-speed-mod
Add osu!taiko `Constant Speed` mod
2024-05-23 21:01:53 +09:00
Bartłomiej Dach
1866b4b6b1
Refactor abstract check to reduce duplication 2024-03-26 11:13:03 +01:00
Bartłomiej Dach
e7cf1ab4df
Add checks for taiko drain rate 2024-03-26 10:58:39 +01:00
Arthur Araujo
6fa663c8ca Make check ruleset specific 2024-03-22 14:48:22 -03:00
Hivie
14b0c41937 remove unnecessary ComputeTimeRange override 2024-02-23 14:22:56 +01:00
Salman Ahmed
ce4fd6aca5 Rename DEFAULT_HEIGHT to BASE_HEIGHT 2024-01-19 23:58:58 +03:00
OliBomby
ec578e1d9f fix near-zero length sliders n stuff being placeable 2023-12-19 21:20:21 +01:00
Dean Herbert
52c2eb93de
Merge branch 'master' into taiko-beat-snap-grid 2023-10-19 23:53:01 +09:00
Dean Herbert
5341a335a6
Bypass Parent nullability checks for now 2023-10-17 17:48:45 +09:00
Dean Herbert
4381169a3f
Combine selection and input handling logic for beat snap grids across all rulesets 2023-10-17 17:09:42 +09:00
Dean Herbert
2a89a25790
Add beat snap grid to osu!taiko editor
Addresses https://github.com/ppy/osu/discussions/25150.
2023-10-17 16:59:56 +09:00
Dean Herbert
f2e56bbb65
Fix publicly-settable bindables 2023-10-06 16:51:24 +09:00
Dean Herbert
cb0226f843 Implement new interface-based speed change visualisation support on mania/taiko 2023-09-20 15:28:13 +09:00
Dean Herbert
37c2b330a2 Move toggle implementation to work on all scrolling rulesets automatically 2023-09-01 19:53:10 +09:00
Bartłomiej Dach
6d018c08af
Rename Apply{Vertical -> Horizontal}Centering to match common understanding 2023-07-28 22:09:28 +02:00
Dean Herbert
deba6e2508 Fix osu!taiko editor playfield missing a piece
Regressed with recent centering changes in https://github.com/ppy/osu/pull/24220
2023-07-27 02:24:10 +09:00
Dean Herbert
0ab0c52ad5 Automated pass 2023-06-24 01:00:03 +09:00
Dean Herbert
f443cfb93e Move blueprint validity conditions to allow more correct external usage of EndPlacement
Until now, these were haphazardly enforce inline in blueprint
implementations. The only thing stopping complete breakage is that
`EndPlacement` wasn't called (too much) from outside the blueprint,
leaving them responsible for their own placement.

By moving this conditional out of the provided paramters to
`EndPlacement`, it allows more flexible usage of that method externally.
Coming in a future PR.
2023-05-12 16:02:22 +09:00
Bartłomiej Dach
7d9327f3e2
Only allow hit placement when left mouse is clicked 2023-04-04 18:40:10 +02:00
Bartłomiej Dach
f42a463479
Remove #nullable disable
May as well that we're here...
2023-04-03 20:14:17 +02:00
Bartłomiej Dach
ed07c0640b
Remove unused using directive 2023-04-03 20:13:59 +02:00
Dean Herbert
be79ea1c10 Remove left/right click based placement in taiko editor and respect sample selection 2023-04-03 18:14:58 +09:00
Dan Balasescu
7bc8908ca9 Partial everything 2022-11-27 00:00:27 +09:00
cdwcgt
f14d871f97
let TaikoSpan show in timeline before placed 2022-10-23 01:32:22 +09:00
cdwcgt
a74e873b98
remove useless using 2022-10-23 01:13:29 +09:00
cdwcgt
42bb9dc3e3
revert EndPlacement change 2022-10-20 22:17:26 +09:00
cdwcgt
d6ed561280
make EndPlacement virtual 2022-10-19 00:31:21 +09:00
cdwcgt
344015a6e6
do not move timeline when EndPlacement 2022-09-27 20:12:40 +09:00
cdwcgt
9c4ae768f1
show object in timeline before placed
just BeginPlacement()
2022-09-27 20:08:32 +09:00
Dean Herbert
48fac9f8a5 Fix taiko drum rolls with zero length being placeable in editor
Addresses https://github.com/ppy/osu/discussions/19808.
2022-08-18 16:50:36 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
4c9d72e62a Ensure EditorBeatmap.Update is called inside PerformOnSelection calls 2021-05-23 21:22:35 +09:00
Dean Herbert
c00e6e29a6 Remove static usage 2021-05-21 14:21:56 +09:00
Dean Herbert
df5970fab4 Create base implementations of the two most common TernaryStateMenuItems 2021-05-20 19:34:53 +09:00
smoogipoo
ffb6135a1b Rework hitobject blueprints to take in hitobject models 2021-05-13 19:53:32 +09:00
Dean Herbert
4c9e94da2b Move context menu logic to base class 2021-04-28 13:43:16 +09:00
Dean Herbert
f2e56bd306 Refactor editor selection/blueprint components to be generic 2021-04-27 19:01:29 +09:00
Dean Herbert
119c9b4294 Fix placement blueprints not being correctly removed after a rolled back placement 2021-04-16 14:11:33 +09:00
Dean Herbert
cd1c1bf534 Centralise cases of performing actions on the current selection
By moving this to a central location, we can avoid invoking the
EditorChangeHandler when there is no selection made. This helps
alleviate the issue pointed out in
https://github.com/ppy/osu/issues/11901, but not fix it completely.
2021-02-26 14:15:13 +09:00
Bartłomiej Dach
5af1ac1b53 Rename TaikoStrong{-> able}HitObject 2020-12-14 21:46:02 +01:00
Bartłomiej Dach
f74567e8eb Introduce base class for hitobjects that can be strong 2020-12-13 12:36:39 +01:00
Dean Herbert
9811c46e35 Rename application method to better describe what it actually does 2020-11-26 19:16:18 +09:00
smoogipoo
4ef2e9548c Pass HitObjectComposer to BlueprintContainer via ctor 2020-11-13 16:59:37 +09:00
Dean Herbert
681e88af40
Merge branch 'master' into editor-fix-button-states-after-paste 2020-10-09 20:51:09 +09:00
Dan Balasescu
ecfb7e94c5
Merge branch 'master' into fix-editor-batch-handling 2020-10-09 20:06:06 +09:00
Dean Herbert
3838f405dd Fix missed usages 2020-10-09 18:50:05 +09:00
Dean Herbert
c9f069d7ed Fix taiko's HitObjectComposer not allowing movement o
f selected hitobjects
2020-10-08 18:17:57 +09:00
Dean Herbert
afed832b19 Tidy up EditorBeatmap slightly 2020-10-08 18:06:49 +09:00
Dean Herbert
38babf3de5 Update usages of ChangeHandler to EditorBeatmap where relevant 2020-10-08 18:04:07 +09:00