mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
use only half of the computer threads for the indexation by default
This commit is contained in:
parent
8d8fe8fd29
commit
a59f437ee3
3 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,7 @@ pub struct UpdateHandler {
|
|||
impl UpdateHandler {
|
||||
pub fn new(opt: &IndexerOpts) -> anyhow::Result<Self> {
|
||||
let thread_pool = rayon::ThreadPoolBuilder::new()
|
||||
.num_threads(opt.indexing_jobs.unwrap_or(0))
|
||||
.num_threads(opt.indexing_jobs.unwrap_or(num_cpus::get() / 2))
|
||||
.build()?;
|
||||
Ok(Self {
|
||||
max_nb_chunks: opt.max_nb_chunks,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue