diff options
author | 2018-03-21 11:46:30 -0700 | |
---|---|---|
committer | 2018-03-21 11:47:41 -0700 | |
commit | f3130e115a58a9df22a4c192c7e71e00c80ac0e6 (patch) | |
tree | 6e06d8fbcc59c4aec31589cca874d8b51e81abed /src | |
parent | 54d57e544450e8ec102bf8d3165a18908b94b72c (diff) |
Memoize non-rule configured targets. This is probably a good idea in general, but especially necessary because OutputFileConfiguredTarget (which is not a RuleConfiguredTarget) contains a reference to its generating configured target, so all the optimizations needed for RuleConfiguredTarget apply to OutputFileConfiguredTarget.
PiperOrigin-RevId: 189942424
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/NonRuleConfiguredTargetValue.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/NonRuleConfiguredTargetValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/NonRuleConfiguredTargetValue.java index 7d592dfcc2..f15f7d09a6 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/NonRuleConfiguredTargetValue.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/NonRuleConfiguredTargetValue.java @@ -32,15 +32,13 @@ import com.google.devtools.build.skyframe.SkyKey; import java.util.ArrayList; import javax.annotation.Nullable; -/** - * A configured target in the context of a Skyframe graph. - */ +/** A non-rule configured target in the context of a Skyframe graph. */ @Immutable @ThreadSafe -@AutoCodec +@AutoCodec(memoization = AutoCodec.Memoization.START_MEMOIZING) @VisibleForTesting -public final class NonRuleConfiguredTargetValue - extends BasicActionLookupValue implements ConfiguredTargetValue { +public final class NonRuleConfiguredTargetValue extends BasicActionLookupValue + implements ConfiguredTargetValue { // These variables are only non-final because they may be clear()ed to save memory. // configuredTarget is null only after it is cleared. |