From 14bb079feb84717965b086e0949f865e2aeac486 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 6 Nov 2020 13:15:33 +0900 Subject: [PATCH] Rename ScorePerformanceManager to ScorePerformanceCache --- osu.Game/OsuGameBase.cs | 2 +- .../{ScorePerformanceManager.cs => ScorePerformanceCache.cs} | 5 +++-- .../Ranking/Expanded/Statistics/PerformanceStatistic.cs | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) rename osu.Game/Scoring/{ScorePerformanceManager.cs => ScorePerformanceCache.cs} (92%) diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index fa183beeb9..3da692249d 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -229,7 +229,7 @@ List getBeatmapScores(BeatmapSetInfo set) dependencies.Cache(DifficultyCache = new BeatmapDifficultyCache()); AddInternal(DifficultyCache); - var scorePerformanceManager = new ScorePerformanceManager(); + var scorePerformanceManager = new ScorePerformanceCache(); dependencies.Cache(scorePerformanceManager); AddInternal(scorePerformanceManager); diff --git a/osu.Game/Scoring/ScorePerformanceManager.cs b/osu.Game/Scoring/ScorePerformanceCache.cs similarity index 92% rename from osu.Game/Scoring/ScorePerformanceManager.cs rename to osu.Game/Scoring/ScorePerformanceCache.cs index 326a2fce7f..8b764c75b7 100644 --- a/osu.Game/Scoring/ScorePerformanceManager.cs +++ b/osu.Game/Scoring/ScorePerformanceCache.cs @@ -13,9 +13,10 @@ namespace osu.Game.Scoring { /// - /// A global component which calculates and caches results of performance calculations for locally databased scores. + /// A component which performs and acts as a central cache for performance calculations of locally databased scores. + /// Currently not persisted between game sessions. /// - public class ScorePerformanceManager : Component + public class ScorePerformanceCache : Component { // this cache will grow indefinitely per session and should be considered temporary. // this whole component should likely be replaced with database persistence. diff --git a/osu.Game/Screens/Ranking/Expanded/Statistics/PerformanceStatistic.cs b/osu.Game/Screens/Ranking/Expanded/Statistics/PerformanceStatistic.cs index cd9d8005c6..730221cc4b 100644 --- a/osu.Game/Screens/Ranking/Expanded/Statistics/PerformanceStatistic.cs +++ b/osu.Game/Screens/Ranking/Expanded/Statistics/PerformanceStatistic.cs @@ -28,7 +28,7 @@ public PerformanceStatistic(ScoreInfo score) } [BackgroundDependencyLoader] - private void load(ScorePerformanceManager performanceManager) + private void load(ScorePerformanceCache performanceCache) { if (score.PP.HasValue) { @@ -36,7 +36,7 @@ private void load(ScorePerformanceManager performanceManager) } else { - performanceManager.CalculatePerformanceAsync(score, cancellationTokenSource.Token) + performanceCache.CalculatePerformanceAsync(score, cancellationTokenSource.Token) .ContinueWith(t => Schedule(() => setPerformanceValue(t.Result)), cancellationTokenSource.Token); } }