Skip to content

Perf/server side filtering and sorting#1521

Open
iandebruin98 wants to merge 16 commits intomainfrom
perf/server-side-filtering-and-sorting
Open

Perf/server side filtering and sorting#1521
iandebruin98 wants to merge 16 commits intomainfrom
perf/server-side-filtering-and-sorting

Conversation

@iandebruin98
Copy link
Copy Markdown
Contributor

Large projects with many resources were noticeably slow because the browser fetched everything and filtered/sorted/paginated client-side. Now the API handles all of that and only returns the page you need. This applies to resource-overview, stem-begroot, comments, and the counter widget.

New API scopes: excludeTags, excludeStatuses, selectTagGroups, withinDistance. Input IDs are parsed as integers before they hit SQL.

Since sorting now happens server-side, random sort can use RAND(seed) instead of RAND() to keep the order stable across pages. The seed is fixed by default (RANDOM_SORT_ROTATION_MS=0). Set it to e.g. 300000 to reshuffle every 5 minutes. The old client-side random sort library is removed.

Admin export (resources/comments) now uses noPagination instead of looping through pages.

@iandebruin98 iandebruin98 requested review from a team as code owners April 1, 2026 12:20
@iandebruin98 iandebruin98 requested review from IanR01, ferhany and rudivanhierden and removed request for a team April 1, 2026 12:20
Comment thread apps/api-server/src/middleware/sorting.js Outdated
@iandebruin98 iandebruin98 requested a review from OscarBakker April 3, 2026 14:49
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