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
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 7d592df..f15f7d0 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 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.