1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

Reduce sorting complexity in worst-case of diffcalc

This commit is contained in:
Dan Balasescu 2022-05-03 15:02:57 +09:00
parent 04fb0f5e63
commit a555c47212

View File

@ -65,6 +65,10 @@ namespace osu.Game.Rulesets.Difficulty.Skills
/// </summary>
private void saveCurrentPeak()
{
// Ignore sections with 0 strain to avoid edge cases of long maps with a lot of spacing between objects (e.g. /b/2351871).
if (currentSectionPeak == 0)
return;
strainPeaks.Add(currentSectionPeak);
}