Skip to content

Commit 794dcc6

Browse files
committed
perf(core): lower vector sync batch defaults
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent d59b974 commit 794dcc6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/basic_memory/config.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,14 @@ class BasicMemoryConfig(BaseSettings):
188188
default=None,
189189
description="Embedding vector dimensions. Auto-detected from provider if not set (384 for FastEmbed, 1536 for OpenAI).",
190190
)
191+
# Trigger: full local rebuilds spend most of their time waiting behind shared
192+
# embed flushes, not constructing vectors themselves.
193+
# Why: smaller FastEmbed batches cut queue wait far more than they increase
194+
# write overhead on real-world projects, which makes full reindex materially faster.
195+
# Outcome: default to the smaller local/cloud-safe batch size we benchmarked as
196+
# the current best end-to-end setting in the shared vector sync pipeline.
191197
semantic_embedding_batch_size: int = Field(
192-
default=64,
198+
default=2,
193199
description="Batch size for embedding generation.",
194200
gt=0,
195201
)
@@ -199,7 +205,7 @@ class BasicMemoryConfig(BaseSettings):
199205
gt=0,
200206
)
201207
semantic_embedding_sync_batch_size: int = Field(
202-
default=64,
208+
default=2,
203209
description="Batch size for vector sync orchestration flushes.",
204210
gt=0,
205211
)

0 commit comments

Comments
 (0)