Skip to content

Commit 8c7bfc0

Browse files
perf: bump framework to 2026.519.1 and apply System.Numerics hot-path optimizations
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/c0af79df-8006-4631-912e-eef9cc6d726b Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent e5e09cb commit 8c7bfc0

9 files changed

Lines changed: 14 additions & 14 deletions

File tree

osu.Android.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</PropertyGroup>
5353

5454
<ItemGroup>
55-
<PackageReference Include="ppy.osu.Framework.Android" Version="2026.517.1" />
55+
<PackageReference Include="ppy.osu.Framework.Android" Version="2026.519.1" />
5656
<!-- `ppy.osu.Framework.NativeLibs` is a transitive dependency of `ppy.osu.Framework`
5757
that ships desktop-only natives (Linux/macOS/Windows) under `runtimes/<rid>/native/`
5858
— including a bare Linux `libbass.so`/`libbass_fx.so`/`libbassmix.so` for linux-arm64.

osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ private void computeSliderCursorPosition()
335335
// This code is designed to prevent buffing situations where lazy end is actually a less efficient movement.
336336
Vector2 lazyMovement = Vector2.Subtract((Vector2)LazyEndPosition, currCursorPosition);
337337

338-
if (lazyMovement.Length() < currMovement.Length())
338+
if (lazyMovement.LengthSquared() < currMovement.LengthSquared())
339339
currMovement = lazyMovement;
340340

341341
currMovementLength = scalingFactor * currMovement.Length();

osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderBall.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void UpdateProgress(double completionProgress)
7272

7373
// Ensure the value is substantially high enough to allow for Atan2 to get a valid angle.
7474
// Needed for when near completion, or in case of a very short slider.
75-
if (diff.Length() < 0.01f)
75+
if (diff.LengthSquared() < 0.0001f)
7676
return;
7777

7878
ball.Rotation = -90 + (float)(-Math.Atan2(diff.X, diff.Y) * 180 / Math.PI);

osu.Game.Rulesets.Osu/Skinning/Argon/ArgonSpinnerDisc.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected override void Update()
205205
else
206206
{
207207
trackingElementInterpolation =
208-
(float)Interpolation.Damp(trackingElementInterpolation, drawableSpinner.RotationTracker.Tracking ? 1 : 0, 0.985f, (float)Math.Abs(Clock.ElapsedFrameTime));
208+
(float)Interpolation.Damp(trackingElementInterpolation, drawableSpinner.RotationTracker.Tracking ? 1 : 0, 0.985f, MathF.Abs((float)Clock.ElapsedFrameTime));
209209

210210
fill.Alpha = trackingElementInterpolation * (tracking_alpha - idle_alpha) + idle_alpha;
211211
centre.Size = new Vector2(trackingElementInterpolation * (tracking_centre_size - idle_centre_size) + idle_centre_size);
@@ -214,7 +214,7 @@ protected override void Update()
214214
const float initial_fill_scale = 0.1f;
215215
float targetScale = initial_fill_scale + (0.98f - initial_fill_scale) * drawableSpinner.Progress;
216216

217-
fill.Scale = new Vector2((float)Interpolation.Lerp(fill.Scale.X, targetScale, Math.Clamp(Math.Abs(Time.Elapsed) / 100, 0, 1)));
217+
fill.Scale = new Vector2((float)Interpolation.Lerp(fill.Scale.X, targetScale, Math.Clamp(MathF.Abs((float)Time.Elapsed) / 100f, 0f, 1f)));
218218
ticks.Rotation = drawableSpinner.RotationTracker.Rotation;
219219
}
220220

osu.Game.Rulesets.Osu/Skinning/Argon/ArgonSpinnerProgressArc.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ protected override void Update()
6868

6969
background.Alpha = spinner.Progress >= 1 ? 0 : 1;
7070

71-
fill.Alpha = (float)Interpolation.DampContinuously(fill.Alpha, spinner.Progress > 0 && spinner.Progress < 1 ? 1 : 0, 40f, (float)Math.Abs(Time.Elapsed));
72-
fill.Progress = (float)Interpolation.DampContinuously(fill.Progress, spinner.Progress >= 1 ? 0 : arc_fill * spinner.Progress, 40f, (float)Math.Abs(Time.Elapsed));
71+
fill.Alpha = (float)Interpolation.DampContinuously(fill.Alpha, spinner.Progress > 0 && spinner.Progress < 1 ? 1 : 0, 40f, MathF.Abs((float)Time.Elapsed));
72+
fill.Progress = (float)Interpolation.DampContinuously(fill.Progress, spinner.Progress >= 1 ? 0 : arc_fill * spinner.Progress, 40f, MathF.Abs((float)Time.Elapsed));
7373

7474
fill.Rotation = (float)(90 - fill.Progress * 180);
7575
}

osu.Game.Rulesets.Osu/Skinning/Argon/ArgonSpinnerRingArc.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ protected override void Update()
4444
{
4545
base.Update();
4646

47-
fill.Progress = (float)Interpolation.DampContinuously(fill.Progress, spinner.Progress >= 1 ? arc_fill_complete : arc_fill, 40f, (float)Math.Abs(Time.Elapsed));
48-
fill.InnerRadius = (float)Interpolation.DampContinuously(fill.InnerRadius, spinner.Progress >= 1 ? arc_radius * 2.2f : arc_radius, 40f, (float)Math.Abs(Time.Elapsed));
47+
fill.Progress = (float)Interpolation.DampContinuously(fill.Progress, spinner.Progress >= 1 ? arc_fill_complete : arc_fill, 40f, MathF.Abs((float)Time.Elapsed));
48+
fill.InnerRadius = (float)Interpolation.DampContinuously(fill.InnerRadius, spinner.Progress >= 1 ? arc_radius * 2.2f : arc_radius, 40f, MathF.Abs((float)Time.Elapsed));
4949

5050
fill.Rotation = (float)(-fill.Progress * 180);
5151
}

osu.Game.Rulesets.Osu/Skinning/Default/DefaultSpinnerDisc.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ protected override void Update()
112112
}
113113
else
114114
{
115-
fill.Alpha = (float)Interpolation.Damp(fill.Alpha, drawableSpinner.RotationTracker.Tracking ? tracking_alpha : idle_alpha, 0.98f, (float)Math.Abs(Clock.ElapsedFrameTime));
115+
fill.Alpha = (float)Interpolation.Damp(fill.Alpha, drawableSpinner.RotationTracker.Tracking ? tracking_alpha : idle_alpha, 0.98f, MathF.Abs((float)Clock.ElapsedFrameTime));
116116
}
117117

118118
const float initial_fill_scale = 0.2f;
119119
float targetScale = initial_fill_scale + (1 - initial_fill_scale) * drawableSpinner.Progress;
120120

121-
fill.Scale = new Vector2((float)Interpolation.Lerp(fill.Scale.X, targetScale, Math.Clamp(Math.Abs(Time.Elapsed) / 100, 0, 1)));
121+
fill.Scale = new Vector2((float)Interpolation.Lerp(fill.Scale.X, targetScale, Math.Clamp(MathF.Abs((float)Time.Elapsed) / 100f, 0f, 1f)));
122122
mainContainer.Rotation = drawableSpinner.RotationTracker.Rotation;
123123
}
124124

osu.Game/osu.Game.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3939
</PackageReference>
4040
<PackageReference Include="Realm" Version="20.1.0" />
41-
<PackageReference Include="ppy.osu.Framework" Version="2026.517.1" />
41+
<PackageReference Include="ppy.osu.Framework" Version="2026.519.1" />
4242
<!--
4343
Explicitly pin `ppy.Veldrid.SPIRV` to the winnerspiros fork build that
44-
`ppy.osu.Framework 2026.517.1` was compiled against. This version is the only
44+
`ppy.osu.Framework 2026.519.1` was compiled against. This version is the only
4545
one whose `runtimes/android-arm64/native/libveldrid-spirv.so` is aligned to 16 KB
4646
pages (required by Android 16+). It lives only as a release asset on
4747
<https://github.com/winnerspiros/veldrid-spirv/releases/tag/1.0> and is vendored

osu.iOS.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
3434
</PropertyGroup>
3535
<ItemGroup>
36-
<PackageReference Include="ppy.osu.Framework.iOS" Version="2026.517.1" />
36+
<PackageReference Include="ppy.osu.Framework.iOS" Version="2026.519.1" />
3737
</ItemGroup>
3838
</Project>

0 commit comments

Comments
 (0)