ArtifactNestedSetFunction: group transitive keys to evaluate together.
RELNOTES: None
@@ -21,6 +21,7 @@ import com.google.devtools.build.skyframe.SkyKey;
import com.google.devtools.build.skyframe.SkyValue;
import com.google.devtools.build.skyframe.ValueOrException2;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.ConcurrentMap;
@@ -103,10 +104,12 @@ class ArtifactNestedSetFunction implements SkyFunction {
}
// Evaluate all children.
+ ArrayList<SkyKey> transitiveKeys = new ArrayList<>();
for (Object transitive : artifactNestedSetKey.transitiveMembers()) {
nestedSetToSkyKey.putIfAbsent(transitive, new ArtifactNestedSetKey(transitive));
- env.getValue(nestedSetToSkyKey.get(transitive));
+ transitiveKeys.add(nestedSetToSkyKey.get(transitive));
}
+ env.getValues(transitiveKeys);
if (env.valuesMissing()) {
return null;
