Skip to content

perf: framework 2026.519.1 bump + deep System.Numerics hot-path optimization pass - #342

Merged
winnerspiros merged 4 commits into
masterfrom
copilot/fix-apk-crash-issue-abc33a28-267d-4d1c-9cd4-b5899d68129e
May 19, 2026
Merged

perf: framework 2026.519.1 bump + deep System.Numerics hot-path optimization pass#342
winnerspiros merged 4 commits into
masterfrom
copilot/fix-apk-crash-issue-abc33a28-267d-4d1c-9cd4-b5899d68129e

Conversation

Copilot AI commented May 19, 2026

Copy link
Copy Markdown
  • Fix CI error: MathF.Clampfloat.Clamp in ParticleSpewer.cs
  • Fix CI errors: 5× MathF.Clampfloat.Clamp in SmokeSegment.cs
  • Fix CI error: double→float implicit cast in OsuModTargetPractice.cs (target.Radius * 2(float)target.Radius * 2)

Copilot AI and others added 2 commits May 19, 2026 17:47
… 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>
@gitar-bot

gitar-bot Bot commented May 19, 2026

Copy link
Copy Markdown

Gitar is working

Gitar

…method)

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/850e952a-f9d0-41e8-8029-923e55c58bcf

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
Copilot AI requested a review from winnerspiros May 19, 2026 18:33
… in OsuModTargetPractice

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/ce8f0232-7f26-43f2-bd5a-69bdb0e1b292

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
Copilot AI requested a review from winnerspiros May 19, 2026 18:51
@winnerspiros
winnerspiros marked this pull request as ready for review May 19, 2026 19:09
Copilot AI review requested due to automatic review settings May 19, 2026 19:09
@winnerspiros
winnerspiros merged commit ba24f66 into master May 19, 2026
14 of 22 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Bumps the winnerspiros osu-framework fork from 2026.517.1 → 2026.519.1 and applies a broad pass of hot-path micro-optimizations across osu.Game and the rulesets: replaces Math.* with MathF.* (avoiding double-precision intermediates), swaps Vector2.Distance for Vector2.DistanceSquared where the result is only compared, hoists invariant trig/exp computations out of loops, and rewrites pow(x,a)/x as pow(x,a-1).

Changes:

  • Framework package bumps to 2026.519.1 in osu.Game.csproj, osu.Android.props, osu.iOS.props (and updated comment).
  • Math.*MathF.* / float.* (Clamp, Lerp, Sin, Cos, Sqrt, Abs, etc.) across many files to cut double↔float casts; hoisted invariants in BezierConverter, StarRatingSequence, AccuracyHeatmap.
  • Distance comparisons changed to DistanceSquared/LengthSquared (avoiding sqrt) in osu/catch editor blueprints, slider ball, autogenerator, difficulty preprocessing, etc.

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
osu.Game/osu.Game.csproj, osu.Android.props, osu.iOS.props Framework package bump to 2026.519.1
osu.Game/Seasonal/IntroChristmas.cs Replace Math.* with MathF.* in particle math
osu.Game/Screens/Play/HUD/ArgonSongProgressBar.cs MathF.Abs over Math.Abs
osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Intro/StarRatingSequence.cs Hoist Math.Exp call outside the per-bar/per-child loops
osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Card/SongPreviewParticleContainer.cs MathF.Cos instead of double Math.Cos
osu.Game/Screens/OnlinePlay/Matchmaking/Queue/CloudVisualisation.cs MathF.Min over Math.Min
osu.Game/Screens/Menu/OsuLogo.cs Cache length and use MathF.Pow with negated exponent
osu.Game/Rulesets/Objects/BezierConverter.cs Hoist cos/sin of ThetaStart outside loop
osu.Game/Overlays/NowPlayingOverlay.cs, Notifications/Notification.cs Cache length, pow with negated exponent
osu.Game/Overlays/MedalAnimation.cs MathF for offset trig
osu.Game/Graphics/ParticleSpewer.cs float.Lerp/float.Clamp; remove Utils import
osu.Game/Graphics/Cursor/MenuCursorContainer.cs DistanceSquared comparison
osu.Game/Graphics/Backgrounds/Triangles.cs, TrianglesV2.cs MathF Box–Muller transform
osu.Game.Rulesets.Taiko/Skinning/Legacy/* MathF.Min/Max/Abs for kiai alpha
osu.Game.Rulesets.Osu/Statistics/AccuracyHeatmap.cs Precompute innerRadius² and compare DistanceSquared
osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs Math.Clamp → float.Clamp
osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs MathF.Max for interval multiplier
osu.Game.Rulesets.Osu/Skinning/Default/SpinnerCentreLayer.cs, DefaultSpinnerDisc.cs float.Lerp / MathF.Abs and avoid double casts
osu.Game.Rulesets.Osu/Skinning/Argon/ArgonSpinner*.cs MathF.Abs over Math.Abs in damping calls
osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs Rewrite CirclePosition with MathF
osu.Game.Rulesets.Osu/Replays/OsuAutoGenerator.cs LengthSquared comparisons for spin offset checks
osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderBall.cs LengthSquared epsilon check; MathF.Atan2
osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPointConnection.cs MathF.Atan2 for rotation
osu.Game.Rulesets.Osu/Mods/OsuModWiggle.cs, OsuModRandom.cs MathF for trig/PI
osu.Game.Rulesets.Osu/Mods/OsuModTargetPractice.cs DistanceSquared with precomputed (2r)² (also fixes CI cast)
osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs, OsuDistanceSnapProvider.cs, Blueprints/GridPlacementBlueprint.cs DistanceSquared comparisons
osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs LengthSquared comparison for shorter movement check
osu.Game.Rulesets.Catch/Edit/CatchBlueprintContainer.cs, Blueprints/FruitPlacementBlueprint.cs, JuiceStreamPlacementBlueprint.cs DistanceSquared snap-radius checks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants