Skip to content

perf: probe visible/inventory paths with OsStr order, not Path components - #835

Merged
jonathanong merged 2 commits into
execute-plan/79dd0742-pr-4-reduce-nodeid-clones-in-selector-edge-appendfrom
execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp
Sep 5, 2026
Merged

perf: probe visible/inventory paths with OsStr order, not Path components#835
jonathanong merged 2 commits into
execute-plan/79dd0742-pr-4-reduce-nodeid-clones-in-selector-edge-appendfrom
execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp

Conversation

@jonathanong

@jonathanong jonathanong commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

Sort and binary-search normalized inventory / visible paths with OsStr byte order (FileNode::cmp), not Path::cmp / compare_components. Shared cmp_os_str_paths / sort_os_str_paths cover FileInventory, GraphFiles, and VisiblePathSnapshot. contains_visible still does not canonicalize on miss.

Fixture fixtures/ts-source/normalized-path-membership locks kebab-vs-nested order (a-b.ts before a/b.ts) and normalize_path collapse.

Local Criterion (source of truth)

Machine: macOS aarch64, rustc 1.96.0, --sample-size 20. Same machine before/after. CodSpeed is not used as a gate.

bench before (mean) after (mean) change
graph_gates_build/1 58.281 ms 68.104 ms +16.9% (p=0.49, noisy)
graph_gates_build/4 47.057 ms 46.381 ms −4.7% (p=0.09, n.s.)
graph/all_domains_build 36.558 ms 31.639 ms −14.3% (p=0.37, n.s.)

Not statistically significant on the ~75-file graph-gates corpus. This is a correctness-aligned comparator (same as FileNode) plus cheaper probes on large inventories.

Shepherd Journal
  • CodSpeed not treated as a gate (mismatched runners). Local Criterion n.s. on graph-gates corpus. No code change this tick.
  • codecov/project/rust: no coverage on base report for stacked PR; not a code defect.
  • codecov/project/javascript "No report found to compare against" and codecov/project/rust "No coverage information found on head" while native/Rust jobs are still inProgress are stacked-PR upload lag, not an OsStr membership defect.
  • Codex quota IC_kwDOSaSRXM8AAAABStTWAQ/IC_kwDOSaSRXM8AAAABStTYFw and Sourcery budget review PRR_kwDOSaSRXM8AAAABMTLdBg are bot-limit notices; minimize only.
  • JavaScript tests run 33953909247 npm pack 5s timeout is the same flake as perf(graph): memcmp concatenated NodeSortKey instead of flatten iterators #831 (tests/js/npm-packages.test.js:54), unrelated to OsStr membership. No [rerun authorized] on this tick; no code change. Iterate.
  • npm pack 5s timeout on run 33953909247 is a known flake (tests/js/npm-packages.test.js:54); rerunning once per [rerun authorized].
  • codecov/project/javascript "No coverage information found on head" while the npm-pack flake rerun 33953909247 is still inProgress is upload lag.

@coderabbitai

This comment has been minimized.

@sourcery-ai

This comment has been minimized.

@codecov

This comment has been minimized.

@codspeed-hq

This comment has been minimized.

@jonathanong
jonathanong force-pushed the execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp branch from 50e4060 to 27bd30c Compare September 5, 2026 07:06
@jonathanong
jonathanong force-pushed the execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp branch from 27bd30c to 761bb00 Compare September 5, 2026 07:40
@jonathanong
jonathanong force-pushed the execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp branch from 761bb00 to 6c68f5b Compare September 5, 2026 07:46
@jonathanong
jonathanong force-pushed the execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp branch from 6c68f5b to 5cba3bb Compare September 5, 2026 07:51
…ents

Binary-search normalized inventory paths with OsStr byte order so membership
probes do not walk Path components on every lookup.
…with OsStr order

Align VisiblePathSnapshot membership with OsStr inventory order and share
one path comparator helper.
@jonathanong
jonathanong force-pushed the execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp branch from 5cba3bb to b887520 Compare September 5, 2026 07:56
@jonathanong
jonathanong marked this pull request as ready for review September 5, 2026 07:56
sourcery-ai[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

@jonathanong
jonathanong merged commit 83932b2 into main Sep 5, 2026
73 of 75 checks passed
@jonathanong
jonathanong deleted the execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp branch September 5, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant