Parallelize document upload

This commit is contained in:
Clément Renault
2025-06-16 16:30:35 +02:00
committed by Kerollmops
parent 2d4f7c635e
commit c6216517c7
6 changed files with 133 additions and 82 deletions

View File

@@ -210,7 +210,7 @@ fn run_extraction_task<FE, FS, M>(
})
}
fn request_threads() -> &'static ThreadPoolNoAbort {
pub fn request_threads() -> &'static ThreadPoolNoAbort {
static REQUEST_THREADS: OnceLock<ThreadPoolNoAbort> = OnceLock::new();
REQUEST_THREADS.get_or_init(|| {

View File

@@ -12,6 +12,7 @@ use std::sync::Arc;
use crossbeam_channel::{Receiver, Sender};
use enrich::enrich_documents_batch;
pub use extract::request_threads;
use grenad::{Merger, MergerBuilder};
use hashbrown::HashMap;
use heed::types::Str;