diff options
author | 2015-12-09 16:23:22 +0000 | |
---|---|---|
committer | 2015-12-09 22:51:10 +0000 | |
commit | d1cd14b432c18e7a4531ea4c23ab7eae3bb327e8 (patch) | |
tree | dc61176e299a37885b95a41309fa723c51992152 /src/main/java/com/google/devtools/build/skyframe/NodeEntry.java | |
parent | 5d058c495c50f4a0a1eee420ac75981ef8cce803 (diff) |
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
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/NodeEntry.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/NodeEntry.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/NodeEntry.java b/src/main/java/com/google/devtools/build/skyframe/NodeEntry.java index 8d9b51db5f..d9f5c87676 100644 --- a/src/main/java/com/google/devtools/build/skyframe/NodeEntry.java +++ b/src/main/java/com/google/devtools/build/skyframe/NodeEntry.java @@ -307,6 +307,14 @@ public interface NodeEntry extends ThinNodeEntry { void addTemporaryDirectDeps(GroupedListHelper<SkyKey> helper); /** + * Add a group of direct deps to the node. May only be called with a {@link Collection} returned + * by {@link #getNextDirtyDirectDeps()} just before enqueuing those direct deps during dependency + * checking. + */ + @ThreadSafe + void addTemporaryDirectDepsGroupToDirtyEntry(Collection<SkyKey> group); + + /** * Returns true if the node is ready to be evaluated, i.e., it has been signaled exactly as many * times as it has temporary dependencies. This may only be called while the node is being * evaluated, that is, before {@link #setValue} and after {@link #markDirty}. |