Files
Tommy D. Rossi 41dea57c01 Speed up long virtual lists and chat chrome updates
A 5,000-row chat hitch on every sidebar click and composer keystroke.
ChatApp owned chrome state and remapped every Transcript row on each
setState. Collapse measured 254ms. Scroll was already fine at ~5ms.

memo(Transcript) so collapsed, draft, model, and footer state do not
rebuild the list. Turns stay in ChatApp. A new message still updates
the list. Sidebar motion and typing no longer walk 5k fibers.

VirtualListEntry::sync also paid for every GPUI frame. Sidebar motion
and the focused caret requested frames, and each one built a HashMap of
all row ids plus cloned focus handles. Return early when config, child
ids, revisions, and focusability match.

getAutomationTree() serialized style, events, and custom props for every
retained node. Locators only match id, type, testId, and text, then read
bounds. That JSON was 110ms on a 5k-row tree, so every
getByTestId().click() was dominated by unused style maps.
to_automation_json() drops those fields. get_tree_json() still uses the
full to_json() path so TestRenderer style inspection is unchanged.

After the change, collapse is 66ms and tree JSON is 22ms. Mount of 5k
rows is still ~220ms in one applyBatch. That is the remaining first-paint
cost, not the interaction hitch.

Also replace the AGENTS.md screencapture recipe with the automation API.
Drive live windows with launch() / connectTest() and testId locators.
Do not use usecomputer or desktop clicks.

```
chrome setState
        │
        ▼
ChatApp re-render
        │
        ├── memo(Transcript)  ►  skip 5k row map
        └── Header / Composer ►  cheap chrome only
```

```
GpuixView::render
        │
        ▼
VirtualListEntry::sync
        │
        ├── ids/revs/focus same  ►  return
        └── otherwise            ►  splice / remeasure
```

INTERACT=1 on examples/profile-chat-scroll.tsx prints mount, getTree,
idle flush, collapse, and expand timings.

Session: ses_fd0cc2171ffedb9Cl9KHr9g62w
2026-08-23 18:11:54 +02:00
..
2026-08-23 16:44:56 +02:00
2026-01-29 15:29:25 +01:00