Repository navigation
Conversation
`NoConfigTransition` always yields the empty configuration, so there is no need to restrict the parent options, run the transition, and go through `BuildConfigurationKeyProducer` for each dependency edge. Every rule has a `package_metadata` attribute that uses `config.none()`, so this applies to each label in `default_package_metadata` for every configured target.
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.
Description
NoConfigTransitionalways produces the empty configuration, regardless of the parent configuration.DependencyProducernow uses its configuration key directly instead of restricting the parent options, applying the transition and runningBuildConfigurationKeyProducerfor every dependency edge through aconfig.none()attribute.Motivation
Every rule has a
package_metadataattribute withcfg = config.none()that is populated fromdefault_package_metadatainpackage()orrepo(), so each label in that list goes through this path once per configured target.Benchmark: 20,000 trivial Starlark targets with
default_package_metadataset inREPO.bazel, analyzed withbazel build --nobuild //.... Each number is the median server CPU time of 32 full reanalyses (forced by changing--define) across 4 server restarts, interleaved between binaries, on a 16-core M3 Max. The interquartile range is in brackets.With three labels, the difference is within noise: it is the same as without any labels, where this change has no effect. In an earlier run with 50 labels, CPU time went from 4.35 s to 4.06 s, which is about 0.3 of the 2.6 µs that each label costs per configured target. The Skyframe graph is unchanged.
Build API Changes
No
Release Notes
RELNOTES: None