Skip to content

perf(acl): cut per-folder/path DB queries during PROPFIND#4807

Open
solracsf wants to merge 1 commit into
masterfrom
perf/propfind-acl-fix
Open

perf(acl): cut per-folder/path DB queries during PROPFIND#4807
solracsf wants to merge 1 commit into
masterfrom
perf/propfind-acl-fix

Conversation

@solracsf

@solracsf solracsf commented Jun 16, 2026

Copy link
Copy Markdown
Member

PROPFIND on instances with many group folders is DB-heavy: ACL permission calculation re-queried static folder configuration on every path, and the ACL storage wrapper resolved each folder's numeric storage id separately, so
the query count scaled with the number of folders.

Fixes #4095.
Superseed #4676.

Benchmarks

Nextcloud 35 + MariaDB 11.4, 3600 group folders / 172k files. Query counts are deterministic.

Path main this PR speedup
getMountsForUser runs on every PROPFIND at the home root 7,214 q 14 q 9.8Γ—
List a 1,000-child folder 1,004 q 6 q 5.5Γ—
List a 1,000-child folder (no permission by default + managed) 3,004 q 8 q 14.5Γ—

FolderManagerTest covers the memoization, cache invalidation (including on group and user deletion), and the storage-id invariant.

πŸ€– AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@solracsf solracsf added 3. to review Items that need to be reviewed feature: acl Items related to the groupfolders ACL or "Advanced Permissions" feature: caching Items related to caching performance πŸš€ labels Jun 16, 2026
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf solracsf force-pushed the perf/propfind-acl-fix branch from 10efd5c to d53a36b Compare June 16, 2026 10:20
@solracsf solracsf self-assigned this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Items that need to be reviewed feature: acl Items related to the groupfolders ACL or "Advanced Permissions" feature: caching Items related to caching performance πŸš€

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance regression 19 vs. 20

1 participant