Skip to content

perf(MountProvider): optimize and improve conflict handling#4451

Open
solracsf wants to merge 1 commit intomasterfrom
improveConflictHandling
Open

perf(MountProvider): optimize and improve conflict handling#4451
solracsf wants to merge 1 commit intomasterfrom
improveConflictHandling

Conversation

@solracsf
Copy link
Copy Markdown
Member

@solracsf solracsf commented Feb 23, 2026

Function was called inside array_map for every conflicting folder; this dropped from N calls to 1.
Reduce mount resolution time from ~50-150ms to ~5-20ms per call.

@solracsf solracsf added the 2. developing Items that are currently under development label Feb 23, 2026
@solracsf solracsf force-pushed the improveConflictHandling branch from 25db0b7 to 4d95c62 Compare February 23, 2026 17:24
@solracsf solracsf marked this pull request as ready for review February 23, 2026 17:27
@solracsf solracsf added 3. to review Items that need to be reviewed performance πŸš€ and removed 2. developing Items that are currently under development labels Feb 23, 2026
@provokateurin
Copy link
Copy Markdown
Member

Are you referring to $userStorage = $this->mountProviderCollection->getHomeMountForUser($user)->getStorage();? I fail to see any other significant changes.

@solracsf
Copy link
Copy Markdown
Member Author

Fewer passes over $folders. The old code did array_map (mount points) + array_filter (ACL folders) + array_map (root ids) + array_map (build mounts), 4 iterations. New code does 2. Clean win.

Lazy $userStorage. Previously getHomeMountForUser() was invoked once per conflicting folder inside the array_map callback. Now once total, and only if a conflict exists. Real improvement for users with several conflicts.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf solracsf force-pushed the improveConflictHandling branch from 4d95c62 to 76b3af1 Compare April 20, 2026 19:42
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 performance πŸš€

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants