Skip to content

Skip the million-row TreeDataGrid test in WebKit - #4232

Merged
nstepien merged 2 commits into
mainfrom
webkit-skip-million-rows
Oct 25, 2026
Merged

nstepien merged 2 commits into
mainfrom
webkit-skip-million-rows

Conversation

@nstepien

@nstepien nstepien commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

The "should expand a group with more rows than a function call can take as arguments" test renders a million rows, which is far more work for WebKit than for other browsers. DataGrid declares one grid row track per row (repeat(${rows.length}, …px) in useViewportRows), and WebKit lays out each track, while Chromium handles the repeat() as a whole. Measured locally:

WebKit Chromium
One layout, 100k rows 18–19 ms ~1 ms
One layout, 1M rows ~250 ms ~1 ms
Mounting the grid, 1M rows 913 ms 61 ms
Memory of the page's process +1.1 GB small

About 0.6 GB of that memory stays committed after the grid unmounts, for the rest of the page's life, and pages run several test files. In CI, the test takes 2.5–5.4 s in WebKit.

The only WebKit flake in CI since October 19, the focus click in test/setupBrowser.ts timing out in run 40029118938, came from the test that ran right after this one: replaying the run's seed shows the order. The page didn't respond for over 2 s, after the grid had already unmounted. A Linux CI experiment in #4234 didn't reproduce that stall, but showed that this test blocks its page's main thread for 2.9–3.6 s, by far WebKit's longest stall in the suite (the next longest take 0.5–1.6 s), and that pages don't stall while idle afterwards. Locally, two other pages stalled for over 2 s in tests that didn't follow this one, so this change may not remove every stall. It does remove WebKit's longest main-thread block, and the memory that test leaves behind.

The test still runs in Chromium and Firefox. It guards against spreading the rows into a function call, which doesn't depend on the browser, and their argument limits (123,758 and 500,000) are well below a million.

Separately, the same layout cost slows scrolling in WebKit with many rows: 186–230 ms per scroll step at 1M rows and 30–44 ms at 100k, against 8–15 ms in Chromium. That's worth its own issue.

vp run ci passes.

🤖 Generated with Claude Code

WebKit lays out each row track of the grid, so the million rows of this test
take ~250ms per layout and ~1 GB of memory, over half of which the page keeps.
The tested code doesn't depend on the browser, and Chromium and Firefox have
lower argument limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nstepien nstepien changed the title Skip the million-row \TreeDataGrid\ test in WebKit Skip the million-row TreeDataGrid test in WebKit Oct 25, 2026
@nstepien
nstepien merged commit 1a6074b into main Oct 25, 2026
6 checks passed
@nstepien
nstepien deleted the webkit-skip-million-rows branch October 25, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant