Avoid list copy in BuildingState.getNextDirtyDirectDeps
Also, in GroupedList, short-circuit expensive group equality check
with a reference check, saving time and garbage when groups are the
same object.
--
MOS_MIGRATED_REVID=109795332
diff --git a/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java b/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java
index 95d23bd..055487a 100644
--- a/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java
+++ b/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java
@@ -450,6 +450,12 @@
}
@Override
+ public synchronized void addTemporaryDirectDepsGroupToDirtyEntry(Collection<SkyKey> group) {
+ Preconditions.checkState(!isDone(), "add group temp shouldn't be done: %s %s", group, this);
+ buildingState.addDirectDepsGroup(group);
+ }
+
+ @Override
public synchronized boolean isReady() {
Preconditions.checkState(!isDone(), "can't be ready if done: %s", this);
return buildingState.isReady();