Skip to content

perf(Storage/Local): avoid recursive array_merge in searchInDir#58915

Open
joshtrichards wants to merge 4 commits intomasterfrom
jtr/refactor-storage-local-file-exists
Open

perf(Storage/Local): avoid recursive array_merge in searchInDir#58915
joshtrichards wants to merge 4 commits intomasterfrom
jtr/refactor-storage-local-file-exists

Conversation

@joshtrichards
Copy link
Member

  • Resolves: #

Summary

searchInDir():

  • Refactors traversal to avoid recursive array_merge accumulation overhead.
    • Less expensive on large trees
  • Also tightens search traversal behavior around symlinks when symlinks are disallowed.
    • symlink-related behavior is even stricter when symlinks are disabled now.

Also refactors file_exists():

  • Extracts case-insensitive exact-case (yes) existence logic into a dedicated helper.
  • Documents why exact basename lookup is required when localstorage.case_insensitive is enabled (hint: case-only rename/copy correctness).

TODO

Checklist

AI (if applicable)

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

…xists

Signed-off-by: Josh <josh.t.richards@gmail.com>
…ensitive FS to helper

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 34 milestone Mar 13, 2026
@joshtrichards joshtrichards marked this pull request as ready for review March 13, 2026 15:25
@joshtrichards joshtrichards requested a review from a team as a code owner March 13, 2026 15:25
@joshtrichards joshtrichards requested review from icewind1991, leftybournes, nfebe and sorbaugh and removed request for a team March 13, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant