perf(files): avoid materializing directory listings in scanner - #64269
Open
joshtrichards wants to merge 3 commits into
Open
perf(files): avoid materializing directory listings in scanner#64269joshtrichards wants to merge 3 commits into
joshtrichards wants to merge 3 commits into
Conversation
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
marked this pull request as ready for review
September 11, 2026 21:43
joshtrichards
requested review from
Altahrim,
CarlSchwan,
icewind1991 and
provokateurin
and removed request for
a team
September 11, 2026 21:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
3. to review, feature component)stable32)AI (if applicable)