Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 2.46 KB

File metadata and controls

58 lines (42 loc) · 2.46 KB

Performance Benchmarks

Date: 2026-06-21
Environment: Node.js 22+, Windows, SSD
Test tools: scripts/competitive-benchmark.js (100K events); also available: scripts/benchmark.js (3000 events, recall/block-rate)

Insertion Performance

Scale Time Rate
1,000 events <100ms ~10,000 evt/s
10,000 events ~500ms ~20,000 evt/s
100,000 events 4.72s ~21,186 evt/s

Search Performance

Query Type p50 p95
FTS5 keyword <2ms 13.91ms
Vector (MAX_SCAN=5000) ~5ms ~50ms
Hybrid (FTS5 + vector) ~3ms ~25ms

Memory Usage

Data Size RSS Heap
Empty DB (startup) ~50MB ~5MB
10K events ~70MB ~10MB
100K events ~300MB ~290MB

Concurrency

Scenario Result
4 concurrent sessions [OK] Isolated, no cross-contamination
SQLite WAL mode [OK] Multi-reader, single-writer supported

Compaction Performance

Metric Value
Pressure computation (100 events) <5ms
Entropy scoring (per message) <0.1ms
Multi-signal importance (per message) <0.2ms

CJK Search Overhead

Metric Value
CJK detection latency <0.01ms
Trigram FTS5 table sync (per insert) ~0.05ms additional
Short-token LIKE fallback (per query) <1ms

Known limitation: CJK trigram tokenizer requires at least 3 characters to form trigrams. Short CJK queries automatically fall back to LIKE '%...%', which is slower but guarantees recall.

Freshness note: Changelog entries for sqlite-vec native integration, MAX_SCAN=5000, CJK short-token fallback, and file logging are reflected here; no completed roadmap item remains listed as pending.

Storage: Each content table (event_log, memory_packets, kg_entities) has a parallel CJK FTS5 table, approximately doubling FTS storage. For a 100K event database (~300MB RSS), the CJK tables add ~15-25MB.