aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-08-13 16:13:42 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-13 16:15:46 -0700
commit6ae05b419922193c4c253e51c9a5e483e4f947fa (patch)
treee06491f807689124cad73a2011af2db821e390e1 /src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
parentce170540ba5401e926a5433e6e35b1d22426e525 (diff)
Order Skyframe evaluations in a priority queue, with all children of a given node having the same priority, later enqueueings having higher priority, re-enqueued nodes having highest priority, and new root nodes having lowest priority. Experimentally, this can save significant RAM (1.4G in some builds!) while not affecting speed.
Also do a semi-drive-by deleting ExecutorFactory parameter to AbstractQueueVisitor, since it was always AbstractQueueVisitor.EXECUTOR_FACTORY. PiperOrigin-RevId: 208560889
Diffstat (limited to 'src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java b/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
index 223b14b37c..6239319247 100644
--- a/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
+++ b/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
@@ -24,7 +24,6 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import com.google.common.eventbus.EventBus;
import com.google.common.testing.GcFinalization;
-import com.google.devtools.build.lib.concurrent.AbstractQueueVisitor;
import com.google.devtools.build.lib.events.Reporter;
import com.google.devtools.build.lib.testutil.TestUtils;
import com.google.devtools.build.lib.util.Pair;
@@ -562,8 +561,7 @@ public class EagerInvalidatorTest {
ImmutableList<SkyKey> diff = ImmutableList.of(GraphTester.nonHermeticKey("a"));
InvalidationState state1 = new DirtyingInvalidationState();
Preconditions.checkNotNull(
- EagerInvalidator.createInvalidatingVisitorIfNeeded(
- graph, diff, receiver, state1, AbstractQueueVisitor.EXECUTOR_FACTORY))
+ EagerInvalidator.createInvalidatingVisitorIfNeeded(graph, diff, receiver, state1))
.run();
assertThat(receiver.getUnenqueuedDirtyKeys()).containsExactly(diff.get(0), skyKey("ab"));
@@ -585,12 +583,7 @@ public class EagerInvalidatorTest {
throws InterruptedException {
Iterable<SkyKey> diff = ImmutableList.copyOf(keys);
DirtyingNodeVisitor dirtyingNodeVisitor =
- EagerInvalidator.createInvalidatingVisitorIfNeeded(
- graph,
- diff,
- progressReceiver,
- state,
- AbstractQueueVisitor.EXECUTOR_FACTORY);
+ EagerInvalidator.createInvalidatingVisitorIfNeeded(graph, diff, progressReceiver, state);
if (dirtyingNodeVisitor != null) {
visitor.set(dirtyingNodeVisitor);
dirtyingNodeVisitor.run();