Skip to content

Commit

Permalink
Use 'optimized' chunk size for 'less-time' algorithm
Browse files Browse the repository at this point in the history
Related to #1
  • Loading branch information
Byron committed Jul 23, 2020
1 parent 295aa2f commit c8c23c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions git-odb/src/pack/index/verify/indexed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
pack::index::{self, verify::util},
};
use git_features::{
parallel::in_parallel_if,
parallel::{self, in_parallel_if},
progress::{self, Progress},
};
use git_object::Kind;
Expand Down Expand Up @@ -74,10 +74,11 @@ impl index::File {
}
}
}
let (chunk_size, thread_limit, _) = parallel::optimize_chunk_size_and_thread_limit(1, None, thread_limit, None);
in_parallel_if(
if_there_are_enough_objects,
Chunks {
size: 50,
size: chunk_size,
iter: tree.bases(),
},
thread_limit,
Expand Down

0 comments on commit c8c23c0

Please sign in to comment.