Skip to content

This release includes breaking changes for platform teams planning a safe upgrade.

Published 3mo MCP Data & Storage
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Summary

AI summary

Fixed Tokio runtime starvation by offloading heavy AI inference and optimized indexing with parallel parsing and batched DB writes.

Full changelog

v0.5.2 - Massive I/O & Concurrency Optimizations 🚀

This release introduces a comprehensive overhaul of the codebase's core indexer, memory handling, and database interaction layers. These changes dramatically reduce indexing time and fix hidden bottlenecks that caused Tokio thread starvation.

⚡ Concurrency & Threading

  • Fixed Tokio Runtime Starvation: Moved heavy AI inference (Qwen3/BERT embeddings) out of the main async executor using spawn_blocking, eliminating server freezing.
  • Removed Async Inference Locks: Extracted the embedding engine behind an Arc clone, allowing the RwLock read guard to be dropped immediately before CPU-bound inference starts.
  • Parallel AST Parsing: The indexer.rs hot loop now uses a bounded JoinSet::spawn_blocking (max 4 concurrent workers). Files are parsed and hashed in parallel, while database writes remain safely sequential.

💽 Disk I/O & Memory Optimization

  • fsync Coalescing in Redb: Implemented put_batch() in the EmbeddingStore. Instead of calling fsync() thousands of times per file, embedding disk caches are now flushed in large, single-transaction blocks (100x disk I/O reduction).
  • BM25 Memory Bloat Fixed: Added OMIT embedding to SurrealDB chunk fetching queries. BM25 search no longer loads thousands of unused 768-dimensional float arrays into RAM.
  • Zero-Copy Hot Loop: Replaced massive content.clone() allocations with move semantics in the parallel AST parser.

🗄️ SurrealDB Query Batching

  • Eliminated N+1 DB Queries (Relations): create_symbol_relations now collects all links in-memory and pushes them to the DB using a single batched FOR $r IN $relations { RELATE ... } statement.
  • Eliminated N+1 DB Queries (Subgraphs): Replaced sequential db.select() inside for loops with a massive SELECT * FROM id1, id2... query.
  • True Symbol Batching: "Fake" batched upserts in create_code_symbols_batch were rewritten into a native INSERT INTO code_symbols ... ON DUPLICATE KEY UPDATE single query.
  • HNSW Vector Index Acceleration: Refactored vector::similarity::cosine vector searches to use the <|K,EF|> KNN operator, activating SurrealDB's internal ANN indexes instead of relying on brute-force O(N) table scans.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track pomazanbohdan/memory-mcp-1file

Get notified when new releases ship.

Sign up free

About pomazanbohdan/memory-mcp-1file

A self-contained Memory server with single-binary architecture (embedded DB & models, no dependencies). Provides persistent semantic and graph-based memory for AI agents.

All releases →

Beta — feedback welcome: [email protected]