forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve creation of
Label
and RepositoryName
instances.
In `Label#getRelativeWithRemapping`, when the current label is in the main repository, default the new label to the main repo as well. This saves the intermediate step of creating (and interning) a garbage `Label` with the default repository, only for `resolveRepositoryRelative` to subsequently create another `Label` in the main repo. In `RepositoryName#create`, optimize for the common repository names (default and main) by skipping the interner cache and other unnecessary checks. PiperOrigin-RevId: 381857421
- Loading branch information
1 parent
d5d3d9b
commit 46aff0e
Showing
2 changed files
with
40 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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