Skip to content

Commit

Permalink
apply & applydp: ensure the parallel iterators are not too small
Browse files Browse the repository at this point in the history
to minimize parallelization overhead
  • Loading branch information
jqnatividad committed Oct 17, 2024
1 parent 40c3102 commit 7d6ce5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
// do actual apply command via Rayon parallel iterator
batch
.par_iter()
.with_min_len(1024)
.map(|record_item| {
let mut record = record_item.clone();
match apply_cmd {
Expand Down
1 change: 1 addition & 0 deletions src/cmd/applydp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
// do actual applydp command via Rayon parallel iterator
batch
.par_iter()
.with_min_len(1024)
.map(|record_item| {
let mut record = record_item.clone();
match applydp_cmd {
Expand Down

0 comments on commit 7d6ce5e

Please sign in to comment.