-
Notifications
You must be signed in to change notification settings - Fork 154
feat: add "first" scope to get_player_scores #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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