Commit Graph

3 Commits

Author SHA1 Message Date
tonyipm 33917ad6f3 feat: implement quicker backend/posix walk algorithm
Rewrite the posix Walk implementation to avoid the extra ReadDir per
directory that was noted as a TODO in the old code.  The new algorithm
holds all traversal state in a walkState struct and uses processDir to
interleave sibling entries in correct S3 lexicographic order without a
second syscall.

Key changes:
prefix optimisation: jump directly into the deepest matching directory
rather than scanning from the root on every call

marker short-circuit: skip entire subtrees that are lexically before
the marker, making paginated listing faster

Co-authored-by: Ben McClelland <ben.mcclelland@versity.com>
2026-03-18 17:39:16 -07:00
John W Higgins bcf341bdaa Add "lexical" sort to walker.go 2026-02-01 16:10:23 -08:00
John W Higgins 73e2df4105 Base import of cutdown version of io/fs/walk.go from golang as walker.go 2026-01-29 13:10:01 -08:00