perf: probe visible/inventory paths with OsStr order, not Path components - #835
Merged
jonathanong merged 2 commits intoSep 5, 2026
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jonathanong
force-pushed
the
execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp
branch
from
September 5, 2026 07:06
50e4060 to
27bd30c
Compare
jonathanong
force-pushed
the
execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp
branch
from
September 5, 2026 07:40
27bd30c to
761bb00
Compare
jonathanong
force-pushed
the
execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp
branch
from
September 5, 2026 07:46
761bb00 to
6c68f5b
Compare
jonathanong
force-pushed
the
execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp
branch
from
September 5, 2026 07:51
6c68f5b to
5cba3bb
Compare
…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
force-pushed
the
execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp
branch
from
September 5, 2026 07:56
5cba3bb to
b887520
Compare
jonathanong
marked this pull request as ready for review
September 5, 2026 07:56
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jonathanong
deleted the
execute-plan/79dd0742-pr-5-normalized-path-membership-without-pathcmp
branch
September 5, 2026 09:18
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.
Summary
Sort and binary-search normalized inventory / visible paths with OsStr byte order (
FileNode::cmp), notPath::cmp/compare_components. Sharedcmp_os_str_paths/sort_os_str_pathscover FileInventory, GraphFiles, andVisiblePathSnapshot.contains_visiblestill does not canonicalize on miss.Fixture
fixtures/ts-source/normalized-path-membershiplocks kebab-vs-nested order (a-b.tsbeforea/b.ts) andnormalize_pathcollapse.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.graph_gates_build/1graph_gates_build/4graph/all_domains_buildNot 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
IC_kwDOSaSRXM8AAAABStTWAQ/IC_kwDOSaSRXM8AAAABStTYFwand Sourcery budget reviewPRR_kwDOSaSRXM8AAAABMTLdBgare bot-limit notices; minimize only.npm pack5s 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.tests/js/npm-packages.test.js:54); rerunning once per[rerun authorized].