You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(vectorstore): eliminate O(n²) memory copy on every add() #570
Adding n documents triggers 1 + 2 + … + n = O(n²) total bytes copied. For a 10 000-document corpus the last insert copies ~9 999 rows unnecessarily.
Impact
HIGH — memory usage and insert latency grow quadratically with corpus size.
Fix
Accumulate chunks in a list[np.ndarray], then call np.vstack() exactly once at the first query (lazy consolidation). Keep a dirty flag so re-consolidation only happens after new adds.
Activity
perf: fix 12 performance bottlenecks across cache, retrieval, tools, …
tests: add 64 regression tests for all 12 performance fixes
AmitoVrito commentedon Apr 20, 2026
Fixed in commit 248fea9 — all 12 performance issues resolved and regression tests added in c10f5eb. Closing.
test: update web_scraper/graphql tests for the shared SSRF guard