Skip to content

Conversation

@AlexTMjugador
Copy link
Contributor

@AlexTMjugador AlexTMjugador commented Jul 25, 2025

Overview

These changes add basic pagination capabilities to the Labrinth routes for fetching moderation reports and projects pending review, using standard LIMIT and OFFSET SQL clauses.

Although these clauses can become inefficient when doing deep pagination (and at the moment the reports fetching route takes ~400 ms to complete), the current primary bottleneck when rendering the related moderation pages is the need to fetch a large amount of project data for each report, very significantly contributing to the several seconds it can take for the page to load. In this context, even a somewhat slow paginated route is an improvement, as it helps the frontend distribute the load of high-volume data queries around.

Additionally, I added an index to the reports table to enable more efficient filtering by report status, which should help reduce the cost of sequential database scans.

@AlexTMjugador AlexTMjugador added this pull request to the merge queue Jul 26, 2025
Merged via the queue into main with commit 358cf31 Jul 26, 2025
3 checks passed
@AlexTMjugador AlexTMjugador deleted the alex/reports-and-mod-projects-pagination branch July 28, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Involves work from the backend team

Development

Successfully merging this pull request may close these issues.

3 participants