Repository navigation
Reuse the traversal path’s rule name in the digest cache - #583
Merged
tinder-maxwellelliott merged 1 commit intoOct 28, 2026
Merged
Conversation
Move the owned canonical name from the completed traversal frame into the cache. The rule node supplies the borrowed name used during traversal.
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.
On its first visit to a rule,
rule_digestclones the canonical name twice. The recursion path already owns the cache key when that visit finishes. Borrow the node’s name for comparisons and move the poppedStringinto the completed-digest cache. This removes one transient string clone per completed rule.A native Bazel test ran the two release-mode binaries on the public 160,000-target fixture, which contains 68,000 rules. The complete hash and dependency-edge files matched in all four pairs. Both binaries also produced identical hashes, edges and warnings for a two-rule cycle in both input orders, and reported the same missing-generator error. Public fixture
On one Mac with eight hashing threads, every PR run took longer than its paired stock run, by 0.003–0.530 s. Median wall time was 1.692 s for v67.0.2 and 1.777 s for this change. All eight runs ranged from 1.674 to 2.204 s, a 0.530 s span. The larger within-binary span was 0.481 s. Median waited peak RSS was 288.24 and 289.82 MiB respectively, with a 51.61 MiB larger within-binary span. The process-level wall and RSS effects remain unresolved. The first pair ran before other discretionary local work was paused.
The Rust and CLI suites, format check and clippy check passed.
bazel build --config=release --lockfile_mode=error //:bazel-diff bazel test --lockfile_mode=error --nocache_test_results \ //:rust_tests //src:cli_tests //:rust_format_check //:rust_clippy_checkCodex for Tamir.