Skip to content

Commit

Permalink
Merge pull request #28592 from peppy/fix-editor-performance
Browse files Browse the repository at this point in the history
Fix editor performance dropping over time when hit markers are enabled
  • Loading branch information
peppy authored Jun 25, 2024
2 parents aadb104 + dc817b6 commit 82bc95e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,14 @@ public ProxyableSkinnableDrawable(ISkinComponentLookup lookup, Func<ISkinCompone

internal void SuppressHitAnimations()
{
UpdateState(ArmedState.Idle);
UpdateState(ArmedState.Idle, true);
UpdateComboColour();

// This method is called every frame. If we need to, the following can likely be converted
// to code which doesn't use transforms at all.

// Matches stable (see https://github.com/peppy/osu-stable-reference/blob/bb57924c1552adbed11ee3d96cdcde47cf96f2b6/osu!/GameplayElements/HitObjects/Osu/HitCircleOsu.cs#L336-L338)

using (BeginAbsoluteSequence(StateUpdateTime - 5))
this.TransformBindableTo(AccentColour, Color4.White, Math.Max(0, HitStateUpdateTime - StateUpdateTime));

Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ private partial class DefaultSliderBody : PlaySliderBody

internal void SuppressHitAnimations()
{
UpdateState(ArmedState.Idle);
UpdateState(ArmedState.Idle, true);
HeadCircle.SuppressHitAnimations();
TailCircle.SuppressHitAnimations();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ protected override void OnApply()

internal void SuppressHitAnimations()
{
UpdateState(ArmedState.Idle);
UpdateState(ArmedState.Idle, true);
UpdateComboColour();

using (BeginAbsoluteSequence(StateUpdateTime - 5))
Expand Down

0 comments on commit 82bc95e

Please sign in to comment.