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>
6 lines
372 B
Markdown
6 lines
372 B
Markdown
---
|
|
"@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.
|