diff options
author | mschaller <mschaller@google.com> | 2018-06-28 10:48:38 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-28 10:50:12 -0700 |
commit | 4e580949c946d48bb9b6f193424badffe1d2eb20 (patch) | |
tree | d2ffb56d5001d4122ebf9eb90083ced76e8db390 | |
parent | bc374771afe9b210105f97519f37d394633a4f70 (diff) |
Short-circuit done node dep registration when no new deps
The short-circuiting code was pulled into the !keepGoing conditional
block inadvertently.
RELNOTES: None.
PiperOrigin-RevId: 202505510
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java index 5381e33bb4..b607e2fa20 100644 --- a/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java +++ b/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java @@ -678,15 +678,15 @@ public abstract class AbstractParallelEvaluator { SkyFunctionEnvironment env, boolean keepGoing) throws InterruptedException { + Iterator<SkyKey> it = env.getNewlyRequestedDeps().iterator(); + if (!it.hasNext()) { + return; + } // We don't expect any unfinished deps in a keep-going build. if (!keepGoing) { Map<SkyKey, ? extends NodeEntry> newlyRequestedDepMap = graph.getBatch(skyKey, Reason.DONE_CHECKING, env.getNewlyRequestedDeps()); - Iterator<SkyKey> it = env.getNewlyRequestedDeps().iterator(); - if (!it.hasNext()) { - return; - } Set<SkyKey> unfinishedDeps = new HashSet<>(); while (it.hasNext()) { SkyKey dep = it.next(); |