Skip to content

Commit c8c23c0

Browse files
committed
Use 'optimized' chunk size for 'less-time' algorithm
Related to #1
1 parent 295aa2f commit c8c23c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

git-odb/src/pack/index/verify/indexed.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::{
55
pack::index::{self, verify::util},
66
};
77
use git_features::{
8-
parallel::in_parallel_if,
8+
parallel::{self, in_parallel_if},
99
progress::{self, Progress},
1010
};
1111
use git_object::Kind;
@@ -74,10 +74,11 @@ impl index::File {
7474
}
7575
}
7676
}
77+
let (chunk_size, thread_limit, _) = parallel::optimize_chunk_size_and_thread_limit(1, None, thread_limit, None);
7778
in_parallel_if(
7879
if_there_are_enough_objects,
7980
Chunks {
80-
size: 50,
81+
size: chunk_size,
8182
iter: tree.bases(),
8283
},
8384
thread_limit,

0 commit comments

Comments
 (0)