aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-08-31 19:22:06 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-08-31 21:06:26 +0000
commit6d9ca5b5bf1854c39bc88419345976d277a720cf (patch)
treec0a9f3980ed96a9a3d99163c3abf02749b6b56d8 /src
parent2ae29debaea7e59897e19e671fb1f7ec94f97648 (diff)
Prefetch children of node being checked for cycles, in case graph implementation caches batched results.
-- MOS_MIGRATED_REVID=101961270
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java
index 2a5a8c8f05..6ddd647a14 100644
--- a/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java
+++ b/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java
@@ -1505,10 +1505,12 @@ public final class ParallelEvaluator implements Evaluator {
}
// This node is not yet known to be in a cycle. So process its children.
- Iterable<? extends SkyKey> children = entry.getTemporaryDirectDeps();
+ Iterable<SkyKey> children = entry.getTemporaryDirectDeps();
if (Iterables.isEmpty(children)) {
continue;
}
+ // Prefetch all children, in case our graph performs better with a primed cache.
+ graph.getBatch(children);
// This marker flag will tell us when all this node's children have been processed.
toVisit.push(CHILDREN_FINISHED);