Live test: each landing in a 20,000-file folder cost a full walk (~0.4 s of
GIL) plus a full workspace rebuild, so Images reads during a run took up to
2.1 s. The monitor's report now patches the stored listing instead.
- output_settled (the monitor hop's target) slices the file's part below
the root in its own case (relative_part; Windows compares folded), and
_run_adds places one root's pending files in one executor batch:
_settled_entry applies the walk's filters (suffix, thumbnails, depth,
symlink by lstat; macOS on-disk spelling), insert_entry puts the
(Path, mtime) entry where the newest-first sort does, add_folder copies
the folder sets. Stored only when no walk started and no drop happened
meanwhile; walked_at is untouched, so the 30 s refresh still walks.
- Anything inexact marks the root dirty and walks as before: a running
walk, an unsliceable path, a failed lstat, a tie in mtime, the cap, an
unexpected error. Rescan, the refresh, the warm-up and invalidation stay
full walks; a walk start forgets the pending adds.
- The workspace caches follow a patched listing by entry identity
(listing_delta): only added values are built, the newest order places
them by bisection, the favorites lookup is copied and extended.
Synthetic 20,000 files: per landing 252 ms (walk + full build) -> 18 ms
(3 ms add + 15 ms warm build).