Skip to content

perf: Move folder pagination to the database#4263

Merged
provokateurin merged 1 commit intomasterfrom
perf/db-pagination
Jan 20, 2026
Merged

perf: Move folder pagination to the database#4263
provokateurin merged 1 commit intomasterfrom
perf/db-pagination

Conversation

@provokateurin
Copy link
Member

@provokateurin provokateurin commented Jan 14, 2026

Ordering is still done in PHP, as we need to make sure that the order is always the same (and not DB specific).

@provokateurin provokateurin added this to the Nextcloud 33 milestone Jan 14, 2026
@provokateurin provokateurin requested a review from susnux January 14, 2026 13:34
@provokateurin provokateurin added 3. to review Items that need to be reviewed performance πŸš€ labels Jan 14, 2026
@provokateurin
Copy link
Member Author

/backport to stable32

@icewind1991
Copy link
Member

icewind1991 commented Jan 14, 2026

I don't think paginating in the DB but sorting in PHP will work. If the enter in the DB are A, C, B in that order, we paginate trough the folders with a page-size of 2, the results will not be ordered. (and still DB specific)

@provokateurin
Copy link
Member Author

Oops yes, I'm too tired today πŸ˜…

@provokateurin provokateurin marked this pull request as draft January 14, 2026 13:53
auto-merge was automatically disabled January 14, 2026 13:53

Pull request was converted to draft

@provokateurin provokateurin added 2. developing Items that are currently under development and removed 3. to review Items that need to be reviewed labels Jan 14, 2026
@provokateurin
Copy link
Member Author

provokateurin commented Jan 15, 2026

I moved ordering to the DB and removed all ordering in the frontend, because we need to have a single source of truth. It works correctly, except for changing the order when seeing a different page than the first one. I'll fix that as well, but should be quite minor. The rest can already be reviewed as is.

Today I can't reproduce this issue anymore.

@provokateurin provokateurin marked this pull request as ready for review January 19, 2026 07:23
@provokateurin
Copy link
Member Author

/backport to stable32

Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin provokateurin merged commit 5202323 into master Jan 20, 2026
53 of 54 checks passed
@provokateurin provokateurin deleted the perf/db-pagination branch January 20, 2026 09:33
@provokateurin
Copy link
Member Author

/backport to stable31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Items that are currently under development performance πŸš€

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants