Files
paseo/packages
paseo-bot[bot] 3428147dbe fix(server): stop re-deriving path state for every scanned directory
Directory suggestion scans were CPU-bound in path bookkeeping rather than
in reading the tree. A 20,000-entry scan of a 197,000-directory home took
6.9s, of which readdir accounted for 50ms; the rest went to repeated path
normalization.

Three redundant passes are removed:

- Discovery re-derived Git-ignore state by walking every ancestor of every
  entry. Traversal only descends through entries that already passed that
  check, so only the entry itself can be newly ignored.
- Discovery re-derived root containment for every child. Only a symlink can
  resolve outside the tree being walked; every other child is its parent's
  path plus a name, and the parent was already proved inside.
- The directory listing cache swept itself for expired keys on every miss
  once it reached its cap, an O(cache size) pass per directory read. Reads
  already reject stale entries by expiry and by directory metadata.

The same scan now takes 1.1s. The new test expresses the budget against a
plain readdir walk of the same tree, so it means the same thing on CI as on
a developer machine: the ratio was 12x and is now under 3x.

Refs #4879
2026-09-22 18:59:19 +02:00
..
2026-09-22 12:25:40 +02:00
2026-09-22 12:25:40 +02:00
2026-09-22 12:25:40 +02:00
2026-09-22 12:25:40 +02:00
2026-09-22 12:25:40 +02:00
2026-09-22 12:25:40 +02:00
2026-09-22 12:25:40 +02:00
2026-09-22 12:25:40 +02:00
2026-09-22 12:25:40 +02:00