Skip to content

perf(files): avoid materializing directory listings in scanner - #64269

Open
joshtrichards wants to merge 3 commits into
masterfrom
jtr/perf-scanner-lazy
Open

perf(files): avoid materializing directory listings in scanner#64269
joshtrichards wants to merge 3 commits into
masterfrom
jtr/perf-scanner-lazy

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Sep 11, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Process storage directory listings lazily during file scans instead of first materializing them with iterator_to_array().

Transactions are deferred until directory processing or child removal begins, preserving the empty-directory fast path. Exceptions raised while consuming a lazy listing roll back any active transaction.

And added/updated scanner coverage for lazy directory iteration and transaction cleanup.

TODO

  • ...

Checklist

AI (if applicable)

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

Process storage directory listings lazily instead of materializing the complete listing with `iterator_to_array()`. Defer transaction creation until the first entry or removal is found, while preserving rollback handling for lazy iterator failures and the existing recursion boundary.

Assisted-by: GitHub Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Verify directory entries are processed incrementally and that failures while consuming the listing roll back any active transaction.

Assisted-by: GitHub Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 11, 2026
@joshtrichards
joshtrichards marked this pull request as ready for review September 11, 2026 21:43
@joshtrichards
joshtrichards requested a review from a team as a code owner September 11, 2026 21:43
@joshtrichards
joshtrichards requested review from Altahrim, CarlSchwan, icewind1991 and provokateurin and removed request for a team September 11, 2026 21:43
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.

2 participants