diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-15 20:31:46 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-15 20:31:46 +0800 |
commit | d2fda42dca410a9319f3f08b24545cbd8b8f1f59 (patch) | |
tree | fbf842c148009ae2e7a8cd07cde5f29440b8846d /src/interactive/app_test | |
parent | 4990fa4202f2b687ee2476efe0a406fdfe23fd96 (diff) |
Revert "Upgrade to jwalk 0.5; stop following symlinks during traversal"
This reverts commit 4990fa4202f2b687ee2476efe0a406fdfe23fd96.
Performance regression - it only uses a single thread for most of the
iteration.
Diffstat (limited to 'src/interactive/app_test')
-rw-r--r-- | src/interactive/app_test/utils.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/interactive/app_test/utils.rs b/src/interactive/app_test/utils.rs index ca9841c..f95efce 100644 --- a/src/interactive/app_test/utils.rs +++ b/src/interactive/app_test/utils.rs @@ -73,11 +73,8 @@ fn delete_recursive(path: impl AsRef<Path>) -> Result<(), Error> { let mut files: Vec<_> = Vec::new(); let mut dirs: Vec<_> = Vec::new(); - for entry in WalkDir::new(&path) - .parallelism(jwalk::Parallelism::Serial) - .into_iter() - { - let entry: DirEntry<_> = entry?; + for entry in WalkDir::new(&path).num_threads(1).into_iter() { + let entry: DirEntry = entry?; let p = entry.path(); match p.is_dir() { true => dirs.push(p), @@ -102,11 +99,8 @@ fn delete_recursive(path: impl AsRef<Path>) -> Result<(), Error> { } fn copy_recursive(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> Result<(), Error> { - for entry in WalkDir::new(&src) - .parallelism(jwalk::Parallelism::Serial) - .into_iter() - { - let entry: DirEntry<_> = entry?; + for entry in WalkDir::new(&src).num_threads(1).into_iter() { + let entry: DirEntry = entry?; let entry_path = entry.path(); entry_path .strip_prefix(&src) |