Add background beatmap processing #19272
Merged
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.
Closes #10242.
As discussed, this is intended to be a stepping stone towards better storage/processing of star ratings locally. The focus here is on the invalidation flow when difficulty algorithm changes occur, so I didn't put too much thought into the
BeatmapInfo
/ realm storage of the star rating.Of note, the default value is now
-1
to differentiate for "zero stars" and "not processed".Also note that this will nuke all local beatmaps' difficulties once. Seems like a good move to get everything in a consistent state. This will also handle legacy issues like "length" not being calculated, for users with very old databases.
As previously mentioned, the online lookup / diff calc portions may eventually be split out (ie. "I only want to recalculate difficulty, not do an online lookup") but in name of simplicity I've left them bundled for now.
I haven't tested with a large database yet, so help there would be appreciated. I'll look to do that today or tomorrow.