The task list (/tasks, the landing page) is slow enough that the rest of the app is unusable. All the work happens on the main thread (no Web Workers), so the task list's re-render loop starves every other page and interaction. The daemon backlog in #1797 makes it much worse by generating a constant stream of task events, but the page has structural problems that would hurt at any real volume.
Causes (from ui/src/tasks/TasksPage.vue and TaskTable.vue)
1. Every live event re-reads the whole board
useLiveResource("tasks",()=>voidload(),500);
load() re-fetches from the top with limit = min(max(currentRows, 100), 500). So any tasks event (presumably debounced/throttled at 500 ms; check useLiveResource in stores/session to confirm the semantics) triggers a fetch of up to 500 rows. With many tasks changing state, that means a full board fetch about twice a second, nonstop.
2. Each reload replaces the array outright
tasks.value=page.tasks;
Every row object is new, so Vue can't skip unchanged rows. visible, showRepo, showIssue and state all recompute over the full list, and the DataTable re-renders every row.
3. Every row mounts a heavy component
Each row mounts its own TaskRowActions (~15 KB SFC) through the #actions slot, along with several Badges and a Timestamp. At 500 rows, that's 500 action components rebuilt on each refresh.
4. No virtualisation (to confirm)
TaskTable passes the full visible array to DataTable. I haven't read components/ui/data-table yet; if it renders every row into the DOM, that's the multiplier on all of the above.
5. Minor: search filter work per row
visible calls search.value.trim().toLowerCase() inside the filter callback, once per row, and lowercases each row's title+repo on every recompute. Hoist the needle out of the loop. Rows could also carry a precomputed lowercase search key.
Proposed fixes (in order of payoff)
Stop full re-reads on live events. Raise the interval to a few seconds as an immediate stopgap. Properly: have the live event carry the changed task id(s) and patch only those rows (fetch /api/tasks/:id, or use the event payload), falling back to a full load() only when status membership changes under the active filter.
Merge by id instead of replacing. Keep a Map<id, Task>, update changed fields in place, and keep row object identity stable so Vue skips unchanged rows. Use shallowRef for the list and only trigger it on actual changes.
Virtualise the table (e.g. @tanstack/vue-virtual or vue-virtual-scroller), so only visible rows plus a small buffer get mounted. This needs care with the ?task=<id> deep-link reveal, which currently relies on document.querySelector('[data-row-key=...]'); it would need to scroll the virtualiser to the index first.
Mount row actions lazily. Render a lightweight trigger per row and mount TaskRowActions only when the menu opens or the row is hovered/focused.
Fix the search filter as described in (5).
Check other useLiveResource subscribers. The same full-refetch pattern likely exists on the dashboard, alerts bell and other pages, and they all run at once on the same main thread.
Verification
Record a Chrome Performance profile on /tasks with a busy backlog, before and after. Look at scripting time per second and long tasks.
Use Vue DevTools to count component renders per live event: after the fix, one changed task should re-render one row.
Add an e2e check: with N≈500 seeded tasks and a burst of status events, the page stays interactive (e.g. the filter input responds within a set budget).
Related
#1797: daemon drains the whole requeued backlog at once; the source of the event storm.
## Summary
The task list (`/tasks`, the landing page) is slow enough that the rest of the app is unusable. All the work happens on the main thread (no Web Workers), so the task list's re-render loop starves every other page and interaction. The daemon backlog in #1797 makes it much worse by generating a constant stream of task events, but the page has structural problems that would hurt at any real volume.
## Causes (from `ui/src/tasks/TasksPage.vue` and `TaskTable.vue`)
### 1. Every live event re-reads the whole board
```ts
useLiveResource("tasks", () => void load(), 500);
```
`load()` re-fetches from the top with `limit = min(max(currentRows, 100), 500)`. So any `tasks` event (presumably debounced/throttled at 500 ms; check `useLiveResource` in `stores/session` to confirm the semantics) triggers a fetch of up to 500 rows. With many tasks changing state, that means a full board fetch about twice a second, nonstop.
### 2. Each reload replaces the array outright
```ts
tasks.value = page.tasks;
```
Every row object is new, so Vue can't skip unchanged rows. `visible`, `showRepo`, `showIssue` and `state` all recompute over the full list, and the `DataTable` re-renders every row.
### 3. Every row mounts a heavy component
Each row mounts its own `TaskRowActions` (~15 KB SFC) through the `#actions` slot, along with several `Badge`s and a `Timestamp`. At 500 rows, that's 500 action components rebuilt on each refresh.
### 4. No virtualisation (to confirm)
`TaskTable` passes the full `visible` array to `DataTable`. I haven't read `components/ui/data-table` yet; if it renders every row into the DOM, that's the multiplier on all of the above.
### 5. Minor: search filter work per row
`visible` calls `search.value.trim().toLowerCase()` inside the filter callback, once per row, and lowercases each row's title+repo on every recompute. Hoist the needle out of the loop. Rows could also carry a precomputed lowercase search key.
## Proposed fixes (in order of payoff)
1. **Stop full re-reads on live events.** Raise the interval to a few seconds as an immediate stopgap. Properly: have the live event carry the changed task id(s) and patch only those rows (fetch `/api/tasks/:id`, or use the event payload), falling back to a full `load()` only when status membership changes under the active filter.
2. **Merge by id instead of replacing.** Keep a `Map<id, Task>`, update changed fields in place, and keep row object identity stable so Vue skips unchanged rows. Use `shallowRef` for the list and only trigger it on actual changes.
3. **Virtualise the table** (e.g. `@tanstack/vue-virtual` or `vue-virtual-scroller`), so only visible rows plus a small buffer get mounted. This needs care with the `?task=<id>` deep-link reveal, which currently relies on `document.querySelector('[data-row-key=...]')`; it would need to scroll the virtualiser to the index first.
4. **Mount row actions lazily.** Render a lightweight trigger per row and mount `TaskRowActions` only when the menu opens or the row is hovered/focused.
5. **Fix the search filter** as described in (5).
6. **Check other `useLiveResource` subscribers.** The same full-refetch pattern likely exists on the dashboard, alerts bell and other pages, and they all run at once on the same main thread.
## Verification
- Record a Chrome Performance profile on `/tasks` with a busy backlog, before and after. Look at scripting time per second and long tasks.
- Use Vue DevTools to count component renders per live event: after the fix, one changed task should re-render one row.
- Add an e2e check: with N≈500 seeded tasks and a burst of status events, the page stays interactive (e.g. the filter input responds within a set budget).
## Related
- #1797: daemon drains the whole requeued backlog at once; the source of the event storm.
03152155 applies #1800's approach to the dashboard (tasks store: tasks, summary, setup) and the Workflows page and editor runs, via a shared ui/src/lib/keep-unchanged.ts that TasksPage now uses too. A reload that changed nothing triggers no render; unchanged rows keep their components. The Workflows runs list no longer clears itself on every live event. Not done: table virtualisation and lazy row actions. task check and pnpm test pass; not yet deployed or profiled in a browser.
03152155 applies #1800's approach to the dashboard (tasks store: tasks, summary, setup) and the Workflows page and editor runs, via a shared ui/src/lib/keep-unchanged.ts that TasksPage now uses too. A reload that changed nothing triggers no render; unchanged rows keep their components. The Workflows runs list no longer clears itself on every live event. Not done: table virtualisation and lazy row actions. task check and pnpm test pass; not yet deployed or profiled in a browser.
Stable rows (keepRows/keepValue) were already in. Now: TaskRowActions mounts its rereview, retry and confirm dialogs only while open (they were three idle dialog trees per row, on the board and in Needs attention); the primary button and overflow menu are unchanged, so keyboard access and layout are as before. Not virtualised: no virtual-list dependency is in ui/package.json, and with unchanged rows now skipped by Vue and the per-row cost cut, a 500-row board does not justify adding one; the data-table and ?task= reveal stay untouched. keepRows/keepValue also applied to StepRun, AgentTranscript, use-task-run, captures/state and BindEvent. typecheck, ui tests and task check pass; not browser-checked. Commit 64bb1957.
Stable rows (keepRows/keepValue) were already in. Now: TaskRowActions mounts its rereview, retry and confirm dialogs only while open (they were three idle dialog trees per row, on the board and in Needs attention); the primary button and overflow menu are unchanged, so keyboard access and layout are as before. Not virtualised: no virtual-list dependency is in ui/package.json, and with unchanged rows now skipped by Vue and the per-row cost cut, a 500-row board does not justify adding one; the data-table and ?task= reveal stay untouched. keepRows/keepValue also applied to StepRun, AgentTranscript, use-task-run, captures/state and BindEvent. typecheck, ui tests and task check pass; not browser-checked. Commit 64bb1957.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The task list (
/tasks, the landing page) is slow enough that the rest of the app is unusable. All the work happens on the main thread (no Web Workers), so the task list's re-render loop starves every other page and interaction. The daemon backlog in #1797 makes it much worse by generating a constant stream of task events, but the page has structural problems that would hurt at any real volume.Causes (from
ui/src/tasks/TasksPage.vueandTaskTable.vue)1. Every live event re-reads the whole board
load()re-fetches from the top withlimit = min(max(currentRows, 100), 500). So anytasksevent (presumably debounced/throttled at 500 ms; checkuseLiveResourceinstores/sessionto confirm the semantics) triggers a fetch of up to 500 rows. With many tasks changing state, that means a full board fetch about twice a second, nonstop.2. Each reload replaces the array outright
Every row object is new, so Vue can't skip unchanged rows.
visible,showRepo,showIssueandstateall recompute over the full list, and theDataTablere-renders every row.3. Every row mounts a heavy component
Each row mounts its own
TaskRowActions(~15 KB SFC) through the#actionsslot, along with severalBadges and aTimestamp. At 500 rows, that's 500 action components rebuilt on each refresh.4. No virtualisation (to confirm)
TaskTablepasses the fullvisiblearray toDataTable. I haven't readcomponents/ui/data-tableyet; if it renders every row into the DOM, that's the multiplier on all of the above.5. Minor: search filter work per row
visiblecallssearch.value.trim().toLowerCase()inside the filter callback, once per row, and lowercases each row's title+repo on every recompute. Hoist the needle out of the loop. Rows could also carry a precomputed lowercase search key.Proposed fixes (in order of payoff)
/api/tasks/:id, or use the event payload), falling back to a fullload()only when status membership changes under the active filter.Map<id, Task>, update changed fields in place, and keep row object identity stable so Vue skips unchanged rows. UseshallowReffor the list and only trigger it on actual changes.@tanstack/vue-virtualorvue-virtual-scroller), so only visible rows plus a small buffer get mounted. This needs care with the?task=<id>deep-link reveal, which currently relies ondocument.querySelector('[data-row-key=...]'); it would need to scroll the virtualiser to the index first.TaskRowActionsonly when the menu opens or the row is hovered/focused.useLiveResourcesubscribers. The same full-refetch pattern likely exists on the dashboard, alerts bell and other pages, and they all run at once on the same main thread.Verification
/taskswith a busy backlog, before and after. Look at scripting time per second and long tasks.Related
03152155applies #1800's approach to the dashboard (tasks store: tasks, summary, setup) and the Workflows page and editor runs, via a shared ui/src/lib/keep-unchanged.ts that TasksPage now uses too. A reload that changed nothing triggers no render; unchanged rows keep their components. The Workflows runs list no longer clears itself on every live event. Not done: table virtualisation and lazy row actions. task check and pnpm test pass; not yet deployed or profiled in a browser.Stable rows (keepRows/keepValue) were already in. Now: TaskRowActions mounts its rereview, retry and confirm dialogs only while open (they were three idle dialog trees per row, on the board and in Needs attention); the primary button and overflow menu are unchanged, so keyboard access and layout are as before. Not virtualised: no virtual-list dependency is in ui/package.json, and with unchanged rows now skipped by Vue and the per-row cost cut, a 500-row board does not justify adding one; the data-table and ?task= reveal stay untouched. keepRows/keepValue also applied to StepRun, AgentTranscript, use-task-run, captures/state and BindEvent. typecheck, ui tests and task check pass; not browser-checked. Commit
64bb1957.