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: ~5 second CLI startup latency per tool call #18
Every bm CLI invocation takes ~5 seconds just to start (Python/uv import overhead), before doing any actual work. Since the plugin shells out to the CLI for each tool call, this adds significant latency.
Measurements
bm status --project claw → 5.4s total
bm tool search-notes ... → 6.7s total
bm tool read-note ... → 6.2s total
bm project list → 5.0s total
Most of the time is Python startup + importing dependencies (FastAPI, SQLAlchemy, fastembed, etc.).
Impact
Medium-High. Each plugin tool call has a 5s floor. For a composited memory_search that queries 3 sources, that's potentially 15s+ of CLI overhead. Users perceive this as sluggishness. For comparison, a raw SQLite query would take <100ms.
Possible Fixes
Long-running daemon: Instead of CLI per-call, have the plugin talk to the MCP server or a lightweight API
Lazy imports: Only import heavy deps (fastembed, etc.) when actually needed
Pre-warmed process pool: Keep a bm process alive between calls
Direct DB access: For simple reads/searches, bypass CLI entirely and query SQLite directly from the TypeScript plugin
Notes
This is a BM CLI issue more than a plugin issue, but the plugin architecture amplifies it
The MCP server approach (if the plugin connected to it instead of shelling out) would eliminate this entirely
Activity
bm-clawd commentedon Feb 22, 2026
Superseded — plugin 1.0 uses persistent MCP server over stdio. No more ~5s CLI cold starts per tool call.