Skip to content
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

Optimize score list views #193

Merged
merged 1 commit into from
Sep 4, 2024
Merged

Optimize score list views #193

merged 1 commit into from
Sep 4, 2024

Conversation

florczakraf
Copy link
Owner

@florczakraf florczakraf commented Aug 29, 2024

Even though there are proper indices in the db, some of the queries are going to be slow when we have to scan and discard a lot of rows. This is the case when we try to access high page numbers of score and highscore lists. The latter is even more problematic, because it orders the rows by two indices.

This PR is not a solution but somewhat a WA for the time being. We will have to think of reworking the scores list, for example by limiting public views to the last month of scores or some N scores to prevent web scrapers and indexing bots from draining the server resources.

before:
image

after:
image

@florczakraf florczakraf self-assigned this Aug 29, 2024
Base automatically changed from update-deps-2024-08-29 to master September 3, 2024 17:58
@florczakraf florczakraf merged commit 79f7c99 into master Sep 4, 2024
11 checks passed
@florczakraf florczakraf deleted the optimize-scores-view branch September 4, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants