mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 17:27:48 +08:00
Avoid overhead from retrieving MaxCombo
inside loop from realm
This commit is contained in:
parent
0916ae1671
commit
87520ae400
@ -14,6 +14,9 @@ namespace osu.Game.Database
|
||||
{
|
||||
public static long GetNewStandardised(ScoreInfo score)
|
||||
{
|
||||
// Avoid retrieving from realm inside loops.
|
||||
int maxCombo = score.MaxCombo;
|
||||
|
||||
var ruleset = score.Ruleset.CreateInstance();
|
||||
var processor = ruleset.CreateScoreProcessor();
|
||||
|
||||
@ -61,7 +64,7 @@ namespace osu.Game.Database
|
||||
if (result == HitResult.Miss || result == HitResult.LargeTickMiss)
|
||||
continue;
|
||||
|
||||
if (processor.Combo.Value == score.MaxCombo)
|
||||
if (processor.Combo.Value == maxCombo)
|
||||
{
|
||||
if (misses.Count > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user