Skip to content

Commit 4eb4412

Browse files
authored
Add files via upload
1 parent 3346ad1 commit 4eb4412

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/document_processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
ROOT_DIRECTORY = Path(__file__).parent
5151
SOURCE_DIRECTORY = ROOT_DIRECTORY / "Docs_for_DB"
52-
INGEST_THREADS = max(2, os.cpu_count() - 8)
52+
INGEST_THREADS = max(2, os.cpu_count() - 12)
5353

5454

5555
from typing import List
@@ -210,7 +210,7 @@ def load_documents(source_dir: Path) -> list:
210210
n_workers = min(INGEST_THREADS, max(len(doc_paths), 1))
211211

212212
total_cores = os.cpu_count()
213-
threads_per_process = 1
213+
threads_per_process = 2
214214

215215
with ProcessPoolExecutor(n_workers) as executor:
216216
chunksize = math.ceil(len(doc_paths) / n_workers)

0 commit comments

Comments
 (0)