Repository navigation
Description
What should be improved?
Opening and closing a task on a large board. #3948 (for #3939) stops the board from re-rendering on every open and close. On a 2,000-task board, though, a task still takes about 2.1 s to show after the click, and after Escape the page takes about 2.05 s to render its next frame. The manual box TASK-P4 sets a target of < 1 s, and wants the close to end with its exit animation. This issue keeps the four costs that remain tracked once #3939 closes.
Current behavior
The setup: local production builds on a 2-vCPU, 4 GiB sandbox, main @ b5ff70447 against #3948's head @ 856a7c738, with 10 samples a side per size, interleaved. The receipt, with its raw samples and traces, is on #3948. The figures are the head's medians:
| 50 tasks | 350 tasks | 2,000 tasks | |
|---|---|---|---|
| Task shows after the click (cold open) | 526 ms | 727 ms | 2.11 s |
| Escape → the page renders without the dialog | 422 ms | 667 ms | 2.05 s |
At 2,000 tasks, a screen recording of an Escape close shows the fade ending on screen by ~0.45 s. The next frame comes at ~2.16 s, and until then the page takes no input.
What remains, largest first:
- A modal's style recalculation over the whole page. A modal Radix layer sets
pointer-events: noneon<body>. The property is inherited, so every element recomputes its style. The open forces that twice: first Presence'sgetComputedStyle, then the dialog'sfocus(). Measured alone, the change costs 105 ms at 9,324 elements (350 tasks) and 625 ms at 48,199 (2,000 tasks). In the head's traces at 2,000 tasks, style takes 1.62 s of a 2.67 s cold open, and the task's first read starts only ~0.9 s after the click. The cause sits in the design system, so every modal over a large page pays it. - React-query observer bookkeeping. Each card holds ~41 observers: 82,183 on the 2,000-task board, 26,058 of them on
current-user. Query keeps a query's observers in an array, so each add or remove scans it. At 2,000 tasks an Escape close keeps the main thread busy for 1.23 s, 1.03 s of it script (traces, n = 3). An earlier CPU profile put ~0.8 s of that close on observer bookkeeping. - The Home panel re-renders on every
?task=change: 488 components on each open and each close. - The dialog's second wave of reads waits for the first. At 350 tasks the activity, comments, labels, dependencies and subscription reads start at ~0.63 s after the click, while the task itself is read from ~0.23 s.
Proposed change
Work on each cost apart. Measure each change on a local production build, before and after, with the same fixtures; #3948's receipt has the harness. These are candidate directions, not decisions:
- (1) is a design-system question: a modal over a big page should not force a whole-document recalculation.
- (2) could use fewer observers per card, for example by reading the viewer and session queries once for the board.
- (3) could keep the Home panel out of
?task=changes. - (4) could start the dialog's reads together.
The target stays TASK-P4's. No laptop has been measured against its < 1 s yet; the numbers above come from a constrained VM, not reference hardware.
Affected service
Platform (web app)
Activity
yannickmonney commentedon Oct 2, 2026
Dialog recheck after #4067 (merged as
2a169f4c7), from the TALE-361 performance occurrence of 2026-10-02 11:15 Zurich.This harness differs from #3948's receipt:
9b91fb64a(before)2a169f4c7(#4067)TASK-P4's target of < 1 s on this host.Details and the 50-task check are on #4062.
perf(ui): keep the page out of a modal's pointer isolation
yannickmonney commentedon Oct 5, 2026
TALE-361 measurement of this issue's flows after main's 5 Oct perf batch. It uses the same arms, stack and fixture as the #4062 recheck: #4062 (comment)
How it was measured
aria-busy.e9c6a8fb3315f216b3TASK-P4The raw samples and
dialog-bench.mjsare in TALE-361's bundle, underocc-20261005T1915/.perf(platform): start a task's own reads together with the task
refactor(platform): list a task's activity and runs in its prefetch
refactor(platform): list a task's activity and runs in its prefetch
tale-code-bot commentedon Nov 2, 2026
Where each cost stands (Coder, TALE-46, 2026-11-02)
TALE-46 works cost (3). The other three landed earlier:
f2ce982dc(perf(ui): keep the page out of a modal's pointer isolation), onmain. While a modal with an overlay is open, the app root carriespointer-events: autoitself, so the body'spointer-events: nonestops there. Its probe measured 0.1 ms instead of 41 ms on a 7,800-element board page.2a169f4c7(fix(platform): stop subscribing every backend read to the session probe #4067),c5894663e,6294cd912andc84217919, all onmain. The recheck of 2026-10-05 above counted the board's react-query observers falling from 34,084 to 1,274.?task=change: TALE-46, branchperf/home-panel-task-paramat5026c3c9313ef623e6d2277fd8efa45ec94d314aon the feature line (feature-train, basefaf58a746e82d4f67f88332d5ba7f0e0af84b05a).HomePanelis now memoised and reads only what it shows from the address. A jsdom test wraps the panel in a React Profiler and opens and closes a board's task through a stand-in for the router's location store: without the change it records anupdateand anested-updatefor each, and with it nothing. Each routerLinkin the panel still re-renders itself when the address changes, as every TanStack Router link does; what it holds does not. The branch's squashed commit carriesCloses #3974, so this issue closes when that commit reachesrelease/0.6with the feature train.113ef5c93(perf(platform): start a task's own reads together with the task), onmain, starts the discussion, dependencies, reviewer and watch-state reads with the task. perf(platform): start a task's activity and run reads with the task #5231 asked the same for the activity and agent-run reads. TALE-315 found they already started with the task, throughuseLatestRunRefusalat the top of the dialog's body (a29ec1d2b, fix(platform): end the dead ends after a task goes to an agent #4017), and named them in the same prefetch with a test that pins them. Its commit is onfeature-trainand carriesCloses #5231. The label catalog fills only the label picker, which opens on a click.Not measured with this change:
TASK-P4's timings, since this worker has no backend for a 2,000-task production build. The recheck of 2026-10-05 above measured medians of 798 ms to open and 492 ms to close on the 2,000-task board onmain(315f216b3), and 1,030 ms for the first open after the board loads (two samples, 872 and 1,188 ms; that open also fetches the dialog's code).refactor(platform): list a task's activity and runs in its prefetch
refactor(platform): list a task's activity and runs in its prefetch
refactor(platform): list a task's activity and runs in its prefetch
refactor(platform): list a task's activity and runs in its prefetch
17 remaining items
perf(platform): keep the Home panel out of a board's ?task= changes
refactor(platform): list a task's activity and runs in its prefetch
perf(platform): keep the Home panel out of a board's ?task= changes
refactor(platform): list a task's activity and runs in its prefetch
perf(platform): keep the Home panel out of a board's ?task= changes
refactor(platform): list a task's activity and runs in its prefetch
perf(platform): keep the Home panel out of a board's ?task= changes
refactor(platform): list a task's activity and runs in its prefetch
perf(platform): keep the Home panel out of a board's ?task= changes
refactor(platform): list a task's activity and runs in its prefetch
perf(platform): keep the Home panel out of a board's ?task= changes
refactor(platform): list a task's activity and runs in its prefetch
perf(platform): keep the Home panel out of a board's ?task= changes
refactor(platform): list a task's activity and runs in its prefetch
perf(platform): keep the Home panel out of a board's ?task= changes