diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-16 07:32:26 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-16 07:32:26 +0800 |
commit | b7ed2bbc957c416e8af08983bba46a4fe2a9553c (patch) | |
tree | 929f1d8ce15193827ef3d586b56e40212aac6566 | |
parent | 394e2615d5fb2cbde9ddb076f1e4867a4161e05a (diff) |
Now we are truly single-threaded when threads = 1
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/common.rs | 8 |
2 files changed, 5 insertions, 5 deletions
@@ -69,7 +69,7 @@ dua interactive #### ✅ v2.3.5 Fast exit from interactive mode for a responsive exit; dependency updates (except jwalk) -#### ✅ v2.3.4 YANKED - jwalk 0.5.0 shows a performance regression +#### ✅ v2.3.4 YANKED - jwalk 0.5.0 wasn't used correctly which led to a performance regression #### ✅ v2.3.3 YANKED - journey tests failed to changed method signature diff --git a/src/common.rs b/src/common.rs index 91a6fb1..b405ec0 100644 --- a/src/common.rs +++ b/src/common.rs @@ -175,10 +175,10 @@ impl WalkOptions { } }) }) - .parallelism(if self.threads == 0 { - jwalk::Parallelism::RayonDefaultPool - } else { - jwalk::Parallelism::RayonNewPool(self.threads) + .parallelism(match self.threads { + 0 => jwalk::Parallelism::RayonDefaultPool, + 1 => jwalk::Parallelism::Serial, + _ => jwalk::Parallelism::RayonNewPool(self.threads), }) } } |