Repository navigation
Borrow repository-local input labels - #581
Merged
tinder-maxwellelliott merged 1 commit intoOct 27, 2026
Merged
tinder-maxwellelliott merged 1 commit into
tinder-maxwellelliott merged 1 commit into
Conversation
The repository owns its attribute strings throughout local-input hashing. Iterate over references and keep them in the ordered set so the scan no longer clones each string or collects a vector per attribute.
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.
Repository attributes already own their strings for the duration of local-input hashing. Borrow those strings through the existing ordered set, and filter the attribute iterators directly. This removes the temporary vector for each attribute and preserves label order and deduplication.
On the checked-in
extension_repo_patchfixture, Bazel 8.8.2 emits 23 attributes for@@sdk_rules++sdk+default_sdk. One scan previously cloned 11 strings, seven nonempty, totaling 123 UTF-8 bytes. Eleven per-attribute vectors held at least one string. The new scan borrows all 11 and retains the same two labels,//patches:sdk.patchand//visibility:private. The complete target-hash and dependency-edge files were byte-identical before and after. These counts describe the scan's allocations. Elapsed time was not measured.Reproduce the attribute counts
From the repository root, decode the fixture's single length-prefixed repository definition and count its populated string fields. The printed fields are the attribute count, nonempty vector count, string count, nonempty string count, and UTF-8 byte count.
Codex for Tamir.