brainy/src
David Snelling 973b6aaa39 perf: defer HNSW persistence during addMany() batch operations
addMany() now temporarily switches the HNSW index to deferred persist
mode during the batch loop. Previously, each add() triggered ~16-20
saveHNSWData calls for modified neighbors (each a read→gzip→atomic-write
cycle). For 450 items this was ~8,100 individual storage writes.

With deferred mode, dirty node IDs are collected in a Set during the
batch and flushed once at the end — deduplicating repeated neighbor
updates. A node modified by insert #3 and again by insert #47 is
written only once.

Also adds setPersistMode() to TypeAwareHNSWIndex, propagating mode
changes to all existing type-specific sub-indexes.
2026-03-22 14:53:11 -07:00
..
aggregation feat: add stddev/variance aggregation ops with Welford's online algorithm 2026-02-17 17:04:11 -08:00
api refactor: remove src/cortex/ directory and fix README claims 2026-02-01 11:07:26 -08:00
cli feat: harden plugin system wiring and add developer diagnostics 2026-02-01 13:03:15 -08:00
config fix: remove dead model config code for true zero-config 2025-12-18 10:31:02 -08:00
critical feat: replace transformers.js with direct ONNX WASM for Bun compatibility 2025-12-17 17:42:37 -08:00
data feat: Phase 3 - Unified Semantic Type Inference (Nouns + Verbs) 2025-10-16 10:59:26 -07:00
distributed feat(v4.0.0): Complete metadata/vector separation architecture with Azure support 2025-10-17 12:29:27 -07:00
embeddings feat: add aggregation engine with incremental SUM/COUNT/AVG/MIN/MAX, GROUP BY, and time windows 2026-02-16 16:57:53 -08:00
errors feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
graph fix: replace require('crypto') with ESM import in SSTable 2026-02-24 12:25:26 -08:00
hnsw perf: defer HNSW persistence during addMany() batch operations 2026-03-22 14:53:11 -07:00
import fix: exclude __words__ keyword index from corruption detection and getStats() 2026-01-27 15:38:21 -08:00
importers refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
integrations refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
interfaces fix: exclude __words__ keyword index from corruption detection and getStats() 2026-01-27 15:38:21 -08:00
mcp refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
migration feat: add migration system with error handling, validation, and enterprise hardening 2026-02-09 16:13:14 -08:00
neural feat: enforce data/metadata separation, numeric range queries, improved docs 2026-02-09 12:07:54 -08:00
patterns 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
scripts feat: add node: protocol to all Node.js built-in imports for bundler compatibility 2025-09-17 14:20:21 -07:00
storage feat: add migration system with error handling, validation, and enterprise hardening 2026-02-09 16:13:14 -08:00
streaming feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
transaction fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
triple fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
types fix: add rootDirectory to BrainyConfig.storage type 2026-03-19 09:46:11 -07:00
universal fix: prevent fs adapter from throwing on import in browser 2025-09-17 16:22:02 -07:00
utils fix: metadata index not cleaned up after delete/deleteMany 2026-02-18 15:33:56 -08:00
versioning fix: exclude __words__ keyword index from corruption detection and getStats() 2026-01-27 15:38:21 -08:00
vfs fix: set verb.source/target to entity UUID instead of NounType 2026-02-02 09:20:38 -08:00
brainy.ts perf: defer HNSW persistence during addMany() batch operations 2026-03-22 14:53:11 -07:00
coreTypes.ts feat: enforce data/metadata separation, numeric range queries, improved docs 2026-02-09 12:07:54 -08:00
index.ts feat: add stddev/variance aggregation ops with Welford's online algorithm 2026-02-17 17:04:11 -08:00
internals.ts fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
pipeline.ts refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
plugin.ts feat: add aggregation engine with incremental SUM/COUNT/AVG/MIN/MAX, GROUP BY, and time windows 2026-02-16 16:57:53 -08:00
setup.ts fix: exclude __words__ keyword index from corruption detection and getStats() 2026-01-27 15:38:21 -08:00
unified.ts chore: enforce consistent coding style and semicolon removal 2025-09-29 09:50:59 -07:00
worker.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00