summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-01-30 14:00:03 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-01-31 17:00:29 -0500
commit8ecd1dc4a60e063251963305b98888236b8d9825 (patch)
treed63a0bb638ffb5acfdde0f8deb398c6b7feb6e66 /src
parent62c998c159b4502c116a0dba505b3d775b451954 (diff)
downloadbfs-8ecd1dc4a60e063251963305b98888236b8d9825.tar.xz
bftw: Optimize -s -j2 searches
Maintaining balance and strict ordering at the same time forces too much work onto the main thread.
Diffstat (limited to 'src')
-rw-r--r--src/bftw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bftw.c b/src/bftw.c
index 400307b..ab930f1 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -802,8 +802,7 @@ static int bftw_state_init(struct bftw_state *state, const struct bftw_args *arg
}
if (state->flags & BFTW_SORT) {
qflags |= BFTW_QORDER;
- }
- if (nthreads == 1) {
+ } else if (nthreads == 1) {
qflags |= BFTW_QBALANCE;
}
bftw_queue_init(&state->fileq, qflags);