Closed Chiffario closed 10 months ago
We already have passed_objects
i guess we can use that
Calculating difficulty attributes requires conversion of hitobjects in Beatmap
to mode-specific objects. This can be very costly, e.g. because of slider generation in osu!standard. Using the general calculator AnyPP
will re-calculate these objects every time.
GradualPerformanceAttributes
stores the objects internally and re-use them each time, making it much more efficient.
I will say though that the gradual calculation is not as battle-tested and its API could be improved a little which I'll get to eventually. Still, in theory it should definitely improve performance for this use case.
rosu-pp's GradualDifficultyAttributes and GradualPerformanceAttributes allow for higher efficiency in calculations. However, to use it you need to track object deltas. Issue is: reading loop is called every 300ms. In some cases there might be no new objects.
process_next_n_objects()
doesn't allow for delta = 0, so we need to adjust for that slightly