demo(benchmark-react): replace react-window with renderLimit#3803
demo(benchmark-react): replace react-window with renderLimit#3803
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Size Change: 0 B Total Size: 80.5 kB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Benchmark React
Details
| Benchmark suite | Current: f31caa5 | Previous: e4371de | Ratio |
|---|---|---|---|
data-client: getlist-100 |
17.3 ms (± 1.21) |
21.4 ms (± 2.29) |
0.81 |
data-client: getlist-500 |
39.9 ms (± 1.18) |
33.1 ms (± 3.14) |
1.21 |
data-client: update-entity |
3.8 ms (± 0.35) |
||
data-client: ref-stability-issue-changed |
50 count (± 0) |
5 count (± 0) |
10 |
data-client: ref-stability-user-changed |
50 count (± 0) |
5 count (± 0) |
10 |
data-client: update-user |
4.8 ms (± 0.10) |
||
data-client: getlist-500-sorted |
38.5 ms (± 2.65) |
||
data-client: update-entity-sorted |
4.7 ms (± 0.39) |
||
data-client: list-detail-switch |
151 ms (± 28.23) |
84.6 ms (± 1.08) |
1.78 |
data-client: update-user-10000 |
21.9 ms (± 2.55) |
||
data-client: invalidate-and-resolve |
29.4 ms (± 1.94) |
12 ms (± 1.52) |
2.45 |
data-client: unshift-item |
5.2 ms (± 0.35) |
7.4 ms (± 0.52) |
0.70 |
data-client: delete-item |
4.4 ms (± 0.39) |
7.1 ms (± 0.24) |
0.62 |
data-client: move-item |
5.8 ms (± 0.13) |
5 ms (± 0.62) |
1.16 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Drop react-window in favor of plain keyed lists with a configurable renderLimit that caps DOM rendering while keeping all data in the store. This decouples store size from DOM pressure and lets React reconcile by key instead of index. Also: - Rename scenarios for clarity (update-entity, update-user, etc.) - Increase default mountCount to 1000 for update/ref-stability scenarios - Make React Compiler the default build (opt-out with REACT_COMPILER=false) Made-with: Cursor
5178002 to
f31caa5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3803 +/- ##
=======================================
Coverage 98.06% 98.06%
=======================================
Files 151 151
Lines 2843 2843
Branches 556 556
=======================================
Hits 2788 2788
Misses 11 11
Partials 44 44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|

Motivation
The react-window virtualized list renders rows by index, which forces React to re-render every visible row on insert/delete. It also couples the DOM size to the store size—changing
mountCountdirectly changes how many DOM nodes exist, conflating store throughput with rendering cost.Solution
react-windowand replace all<List>usages withPlainIssueList, a plain keyed list. React can now reconcile by key, skipping unchanged rows on insert/delete.renderLimit— a per-scenario cap on how many items render to the DOM, while the store still holds the full dataset. This decouples store size from DOM pressure and makes update scenarios (update-entity, update-user, ref-stability) measure store propagation rather than rendering cost.update-single-entity→update-entityupdate-shared-user-500-mounted→update-user(now 1000 items)update-shared-user-10000-mounted→update-user-10000sorted-view-mount-500→getlist-500-sortedsorted-view-update-entity→update-entity-sortedmountCountfrom 100/500 to 1000 for update and ref-stability scenarios, withrenderLimit: 100to keep DOM size constant..babelrc.jsnow enables it unlessREACT_COMPILER=false. README instructions updated to document the opt-out path.Open questions
N/A
Made with Cursor
Note
Medium Risk
Benchmark behavior and scenario definitions change substantially, which can shift CI perf baselines and potentially introduce measurement flakiness, but this is isolated to the
examples/benchmark-reacttooling/docs.Overview
React benchmark scenarios are redefined to decouple store size from DOM size. The suite removes
react-windowvirtualization in favor of a keyedPlainIssueList, and introduces a per-scenariorenderLimitthat caps rendered rows while still mounting larger datasets in the store.Runner/scenario plumbing is updated accordingly.
bench/scenarios.tsrenames and retunes several hot-path scenarios (including new sorted variants), increases defaultmountCount(often to 1000/10000) while applyingrenderLimit: 100, andbench/runner.tsnow callswindow.__BENCH__.setRenderLimit()when configured.Build/usage defaults shift toward React Compiler-on.
.babelrc.jsenables the React Compiler unlessREACT_COMPILER=false,package.jsonaddsbuild:no-compiler/bench:no-compilerscripts and dropsreact-window, and docs/guidelines are updated to reflect the new scenario names/variance expectations and compiler opt-out flow.Written by Cursor Bugbot for commit f31caa5. This will update automatically on new commits. Configure here.