diff options
author | Brian Silverman <bsilver16384@gmail.com> | 2016-02-15 16:26:16 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-02-16 09:40:05 +0000 |
commit | e798a520e8ae0d2f3baa5149390d3fb63c81c9c6 (patch) | |
tree | 7fb8b38739a07fba98a1c6873c6a55d1affc66b2 /src/test/java/com/google | |
parent | bbe748063fa139949656fd7a8dec86ebdecddb6f (diff) |
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
<https://gist.github.com/bsilver8192/10527a862ce16bb7f79a>.
--
Change-Id: I7a7aaccdfbe2925c7e962c0192924ef1cf80b33a
Reviewed-on: https://bazel-review.git.corp.google.com/#/c/2840/1..2
MOS_MIGRATED_REVID=114694334
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedStrategyTest.java | 4 |
1 files changed, 1 insertions, 3 deletions
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())); } /** |