From e798a520e8ae0d2f3baa5149390d3fb63c81c9c6 Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Mon, 15 Feb 2016 16:26:16 +0000 Subject: Reduce the number of stat calls when setting up a sandbox This improved performance for a (somewhat artificial) test which runs 100 genrules each with 3000 inputs by 25% on my laptop (2x hyperthreaded cores, SSD, ext4). Test code at . -- Change-Id: I7a7aaccdfbe2925c7e962c0192924ef1cf80b33a Reviewed-on: https://bazel-review.git.corp.google.com/#/c/2840/1..2 MOS_MIGRATED_REVID=114694334 --- .../google/devtools/build/lib/sandbox/LinuxSandboxedStrategyTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/test/java') diff --git a/src/test/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedStrategyTest.java b/src/test/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedStrategyTest.java index daed53ec3d..b2fe0e6720 100644 --- a/src/test/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedStrategyTest.java +++ b/src/test/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedStrategyTest.java @@ -80,9 +80,7 @@ public class LinuxSandboxedStrategyTest extends LinuxSandboxedStrategyTestCase { Path customMountPath = workspaceDir.getRelative(customMount); mounts.put(customMountPath, customMountPath); } - return LinuxSandboxedStrategy.validateMounts( - LinuxSandboxedStrategy.withResolvedSymlinks( - LinuxSandboxedStrategy.withRecursedDirs(mounts.build()))); + return ImmutableMap.copyOf(LinuxSandboxedStrategy.finalizeMounts(mounts.build())); } /** -- cgit v1.2.3