Conversation
Also thread metadata through the ignore_file -> build_node boundary so filter-active walks (-x / -M / -A / -y) stat each entry at most once. Correctness verified by diffing output against the pre-change binary with default flags, -i, -e, -v, -X, -M, -x. Assisted-by: Claude Opus 4.7 (code review, refactoring)
Assisted-by: Claude Opus 4.7 (code review, refactoring)
Under `-f` the file's stat is mostly thrown away — `node_from_tuple` sets size to 1 and the time fields are only read when -M/-A/-y are on. The only field still needed downstream is `inode_device` for `clean_inodes` dedup, and both halves are syscall-free: `inode` from `DirEntry::ino()` (getdents64), `dev` from the parent directory's cached tuple. Gated to `-f` without `-L` and without metadata-needing filters, so output is byte-identical to the previous stat path. Unix-only; Windows DirEntry has no cheap d_ino analogue. Assisted-by: Claude Opus 4.7 (code review, refactoring)
Syscall reduction verified via strace on a 3-dir / 5-file test tree: statx count drops from 11 to 8, exactly one per directory saved. Assisted-by: Claude Opus 4.7 (code review, refactoring)
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.
see: #575