Reduce the time to import a dump

With this commit, for a dump containing 1M tasks we went from 3m36s to import the task queue down to 1m02s
This commit is contained in:
Tamo 2023-03-29 14:27:40 +02:00
parent 31bb61ba99
commit cf5145b542
2 changed files with 135 additions and 112 deletions

View file

@ -367,12 +367,14 @@ fn import_dump(
log::info!("All documents successfully imported.");
}
let mut index_scheduler_dump = index_scheduler.register_dumped_task()?;
// 4. Import the tasks.
for ret in dump_reader.tasks()? {
let (task, file) = ret?;
index_scheduler.register_dumped_task(task, file)?;
index_scheduler_dump.register_dumped_task(task, file)?;
}
Ok(())
Ok(index_scheduler_dump.finish()?)
}
pub fn configure_data(