forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 0
perf: second-pass hot-path audit — MathF, DimmablePieces cache, Taiko loop #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3f5c113
Fix non-default mod settings allowing for duplicate freestyle mod sel…
triacontakai 7f385c7
Add better support for handling disconnection at the ranked play queu…
peppy 1818c1b
Fix pause ambience loop not playing at fail screen (#37663)
peppy 066ad47
Merge upstream ppy/osu master (3 commits: #37663 #37658 #37646) — pri…
Copilot 80d7543
perf: LINQ→loop (BarHitErrorMeter), cache isAutoplayPlayback, Android…
Copilot 6585152
merge: incorporate upstream ppy/osu content (CloudVisualisation, Scre…
Copilot 4a57187
perf: hot-path alloc elimination batch (ScoreProcessor, DrawableSlide…
Copilot 32c6732
perf: second-pass optimizations (LegacyHitPolicy single-pass, Drawabl…
Copilot 7940a25
Perf: third-pass hot-path allocation fixes
Copilot 4d7aa83
perf: third-pass - eliminate OfType LINQ allocations in OsuModRelax/S…
Copilot a6e65e8
fix: CI build errors + fourth-pass perf (IList cast, IDE0004/IDE0032,…
Copilot 7bddedd
fix: CI errors batch 2 - missing using, nullable, pattern matching, r…
Copilot da43f16
fix: remove unused osu.Game.Audio using in DrawableSlider.cs (IDE0005)
Copilot 17febd8
fix: add partial to AndroidBackgroundDataStoreProcessor (Android DI s…
Copilot 3cd3d90
fix: resolve co-variant array conversion warnings (HitSampleInfo[] to…
Copilot 31a95b0
fix: add missing `using osu.Game.Audio` to DrawableSlider.cs (CS0246 …
Copilot aa829ed
fix: add braces and line break for foreach/if in DrawableSlider (Insp…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
| // See the LICENCE file in the repository root for full licence text. | ||
|
|
||
| using osu.Game.Database; | ||
|
|
||
| namespace osu.Android | ||
| { | ||
| /// <summary> | ||
| /// Android-specific <see cref="BackgroundDataStoreProcessor"/> that extends the sleep | ||
| /// interval during active gameplay from the default 30 s to 2 minutes. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// On Android the high-performance session (<see cref="Performance.AndroidHighPerformanceSessionManager"/>) | ||
| /// flips <c>GCSettings.LatencyMode</c> to <c>SustainedLowLatency</c> for the entire gameplay window, | ||
| /// which suppresses Gen-2 (major) GC collections. The background processor's sleep loop also | ||
| /// suspends during gameplay, but wakes every <see cref="BackgroundDataStoreProcessor.TimeToSleepDuringGameplay"/> | ||
| /// ms to re-check the condition. Each wake-up incurs a managed thread resume + lock acquisition, | ||
| /// generating a small burst of GC-visible allocations. At 30 s those spurious wakes happen ~10× | ||
| /// per typical 5-minute play session; at 120 s they drop to ~2×, cutting the associated | ||
| /// allocation pressure and the risk of a GC stall at the worst possible moment. | ||
| /// </remarks> | ||
| public class AndroidBackgroundDataStoreProcessor : BackgroundDataStoreProcessor | ||
| { | ||
| // 2-minute polling interval while gameplay is active (vs. the default 30 s). | ||
| protected override int TimeToSleepDuringGameplay => 120_000; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.