0.9.4.40 is a performance and polish release. Ranked search queries that used to rebuild the entire BM25 index on every call now run in under 250 µs. The dashboard Agents page renders instantly even with dozens of chains. And the daemon now gives you audio feedback on every read operation, so you can tell whether MentisDB is scanning or committing just by listening.
Ranked search is 99.3% faster. On a 5,000-thought chain,
query_ranked_lexical_content drops from ~35 ms to ~237 µs.
query_ranked_filtered_lexical drops from ~35 ms to ~23 µs.
The index is built once at chain open time and updated incrementally on every
append_thought — no more O(n) rebuild inside the query hot path.
The previous implementation called LexicalIndex::build_with_registry
inside every ranked search query. That meant tokenizing all thought content, tags,
concepts, agent IDs, and registry metadata into BM25 posting lists from scratch
— every single time you searched.
The new implementation stores a LexicalIndex as a first-class field
on MentisDb, builds it once when the chain is opened, and appends to
it incrementally via lexical_index.observe() on every thought commit.
Query latency becomes sub-millisecond and scales sub-linearly with chain size.
| Benchmark | Before | After | Improvement |
|---|---|---|---|
query_ranked_lexical_content | 35.4 ms | 237 µs | 99.3% |
query_ranked_filtered_lexical | 35.2 ms | 23 µs | 99.9% |
query_baseline_append_order | 1.82 ms | 1.83 ms | no change |
The Agents page used to call /dashboard/api/agents, which synchronously
opened every chain and counted all thoughts. With many chains this was O(chains × thoughts)
and blocked the entire page.
The new implementation loads in two phases:
/dashboard/api/chains (fast registry read)
to render a skeleton with spinners per chain./dashboard/api/agents/:chain_key for each chain, updating DOM
sections independently as responses arrive.The page skeleton appears instantly. Slow chains don't block fast ones. Every refresh hits live APIs, so counts are always accurate.
When MENTISDB_THOUGHT_SOUNDS=true, every logged read operation now
plays a unique short chime. The design makes the read/write distinction instinctive:
| Operation | Waveform | Frequency | Feel |
|---|---|---|---|
| Write (append, bootstrap) | Square wave | 250–1,000 Hz | Heavy, stamping, committing |
| Read (search, list, get) | Sine wave | 2,500–4,500 Hz | Light, scanning, querying |
Twenty-three read operations each have a unique 60–150 ms sequence, but they all share the "read timbre." You can learn individual sounds over time, but you always know instantly whether MentisDB is reading or writing.
cargo install mentisdb --force
No migration required. The incremental LexicalIndex is transparent — existing chains are indexed once on open and then maintained automatically.