Speeds up task-list load and interaction for projects with 100+ tasks. - Migration 59 adds idxTasksColumn and idxTasksUpdatedAt; listTasks() filters by "column" on every board load and SSE/refresh paths sort by updatedAt, so each query was previously a full table scan plus a temp B-tree sort. - Debounce handleEmbeddedOpenDetail in ListView so rapid keyboard/mouse navigation no longer fires a heavy /tasks/:id (log + comments) per selection; stale-target requests short-circuit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
986 B
986 B
@runfusion/fusion
| @runfusion/fusion |
|---|
| patch |
Speed up dashboard load and interaction for projects with 100+ tasks.
Two cheap fixes that together cover the dominant hot paths:
- DB indexes on
tasks.columnandtasks.updatedAt(migration 59 inpackages/core/src/db.ts).listTasks()filters by"column"on every board load, and the SSE/refresh paths sort byupdatedAt; neither column had an index, so each query did a full table scan plus a temp B-tree sort. With 100+ tasks this becomes the dominant cost on initial load. - Debounce embedded detail-pane fetches (
packages/dashboard/app/components/ListView.tsx).handleEmbeddedOpenDetailpreviously fired a fullfetchTaskDetail(which pulls log + comments) synchronously on every selection change, so rapid keyboard/mouse navigation through a long list would issue a burst of heavy requests. Fetches are now debounced to 200 ms and stale-target requests short-circuit before hitting the server and before applying state.