Avoid creating a copy of tree artifacts expansion for discovered inputs.
Take a reference directly to the set within `TreeArtifactValue` instead of
making a copy.
@@ -984,7 +984,7 @@ public class ActionExecutionFunction implements SkyFunction {
}
if (retrievedMetadata instanceof TreeArtifactValue) {
TreeArtifactValue treeValue = (TreeArtifactValue) retrievedMetadata;
- expandedArtifacts.put(input, ImmutableSet.copyOf(treeValue.getChildren()));
+ expandedArtifacts.put(input, treeValue.getChildren());
for (Map.Entry<Artifact.TreeFileArtifact, FileArtifactValue> child :
treeValue.getChildValues().entrySet()) {
inputData.putWithNoDepOwner(child.getKey(), child.getValue());
