Skip to content

Commit

Permalink
remove use of sequential flag
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Aug 28, 2024
1 parent 919020d commit 9bd4975
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions noir/noir-repo/tooling/nargo_cli/src/cli/compile_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,11 @@ fn compile_programs(
Ok(((), warnings))
};

let program_results: Vec<CompilationResult<()>> = if compile_options.sequential {
binary_packages.iter().map(compile_package).collect()
} else {
// Configure a thread pool with a larger stack size to prevent overflowing stack in large programs.
// Default is 2MB.
let pool = rayon::ThreadPoolBuilder::new().stack_size(4 * 1024 * 1024).build().unwrap();
pool.install(|| binary_packages.par_iter().map(compile_package).collect())
};
// Configure a thread pool with a larger stack size to prevent overflowing stack in large programs.
// Default is 2MB.
let pool = rayon::ThreadPoolBuilder::new().stack_size(4 * 1024 * 1024).build().unwrap();
let program_results: Vec<CompilationResult<()>> =
pool.install(|| binary_packages.par_iter().map(compile_package).collect());

// Collate any warnings/errors which were encountered during compilation.
collect_errors(program_results).map(|(_, warnings)| ((), warnings))
Expand Down

0 comments on commit 9bd4975

Please sign in to comment.