Files
fusion/.changeset/agentstore-db-cache.md
gsxdsm 41bb6be0f8 perf(core): cache AgentStore SQLite connection per project
The dashboard re-instantiates AgentStore on every /api/agents request, and
each instance was opening a fresh Database — re-running schema migrations
and PRAGMA integrity_check on the full file. On a multi-hundred-MB DB that
was 3-7s per request and leaked file handles. Sharing a cached Database
keyed by rootDir reduces it to a one-time process cost.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 02:02:09 -07:00

372 B

@runfusion/fusion
@runfusion/fusion
patch

Cache the AgentStore SQLite connection per project so the dashboard no longer reopens the database, re-runs migrations, and re-executes PRAGMA integrity_check on every /api/agents request. On large project databases this turned a sub-100ms call into multi-second latency that bled into every dashboard view fetching the agent list.