feat: add "first" scope to get_player_scores#606
feat: add "first" scope to get_player_scores#606minisbett wants to merge 3 commits intoosuAkatsuki:masterfrom
Conversation
for more information, see https://pre-commit.ci
tsunyoku
left a comment
There was a problem hiding this comment.
ignoring the fact i see this becoming SHIT slow on maps with many scores, this needs consideration/ignoration for restricted users as their first places should not count
|
|
i still think this would be a nice feature to get in, however i'm still concerned about performance - we should be using an intermediary table that is inserted to on score submission if |
|
Would it be possible to add this to the V2 API in a separate PR? |
This would likely need a better implementation from scratch because it is super slow, eg. via a separate table or column |
do you know the performance differences between this implementation & use of a window function? and do you have a sense of what sort of latency we're talking about with ~1mil+ scores? (or the general scalability?) lastly, are you running bancho.py with the indices introduced last year? |
I no longer run bpy, but yes I used the indecies. With I believe 2-3 million scores the query took seconds on users, not sure how many. But it for sure was noticably the last thing on the website that loaded. |
Describe your changes
Adds the "first" scope for first-place scores to the API v1, as the API v2 does not contain any implementation for this kind of stuff yet.
Checklist