Repository navigation
[experimental] export: React logs no render timings while the export draws a page - #12323
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Changes requested: the render change holds up, and one release-note sentence needs correcting.
.changeset/render-no-render-timings.md:5says "A chart of 50,000 points took 42 s to render and now takes 29 s", but the page this pull request measured holds four charts of 50,000 points, so please reword it as "A page of four charts of 50,000 points each took 42 s to render and now takes 29 s."
The new test fails without the change and passes with it, the render tests pass, and the written file stays byte-identical on the pages checked. Non-blocking: the worker comment at page-worker.mjs:495 repeats the one-chart wording, and "when they carry a lot of data" reads broader than the speedup shown, since a 50,000-point line chart draws no faster; "when they draw many bars or points" fits better.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset: charts draw about a third faster when they carry a lot of data: partly verified; a 40,000-bar page drew in 17-19 s instead of 22.4 s, and a 50,000-point line chart drew no faster.
- Changeset: React no longer logs each render's timing while the render draws: verified; the new test fails on the base worker (106 and 307 timing calls) and passes on the head.
- Changeset: a chart of 50,000 points took 42 s and now takes 29 s: false as worded; the measured page holds four such charts.
- Changeset: the file it writes is the same: verified; byte-identical files on four pages.
- Description: React's development build records each component render for the Performance panel and copies changed props into the timing entry: verified in React DOM 19.3.1's development client.
- Description: React DOM's client now loads with the timing hook hidden, so React records nothing: verified (
page-worker.mjs:490-508,:1370). - Description: React stays the development build and the page's own warnings still reach the output: verified; the same warnings on the pages checked.
- Description: the command is experimental and its output does not change: verified.
- Description: the heavy page took 42.5 s and now 28.7 s, four other pages take the same time, and 45 pages give identical output: the author's measurements, not reproduced here; consistent with the pages checked.
- Description: one defect, no new public API, no internal context: verified.
- Description: the render test command passes: verified (304 passed, 3 skipped).
- File
.changeset/render-no-render-timings.md: the finding above. - File
packages/cli/api/render/render.test.mjs: clear. - File
packages/cli/foundation/render/page-worker.mjs: clear, apart from the non-blocking comment wording.
28021ca to
5f7f9f6
Compare
There was a problem hiding this comment.
Changes requested: the render change holds up and the earlier release-note fix is in, but the changeset still promises a wider speedup than the change gives.
.changeset/render-no-render-timings.md:5says charts draw "about a third faster when they draw many bars or points", but through the base and head render workers four bar charts of 50,000 bars each, two series of 10,000 bars, four scatter charts of 5,000 points and a 50,000-point line chart take the same time and only bar charts with a tooltip and legend got faster (12–17%), so please narrow it, for example to "draws some large chart pages faster: React no longer logs each render's timing while the render draws them. A page of four charts of 50,000 points each took 42 s to render and now takes 29 s; most pages take the same time as before. The file it writes is the same."
That condition was the previous review's own suggestion, and these measurements show it is still too broad. The new test fails without the change and passes with it, the render tests pass, and seven chart pages write byte-identical files with the same warnings. Non-blocking: the description's "every record copies its props" and the worker comment at page-worker.mjs:494-495 overstate the same point, since React records only the changed props of a re-render.
Claims and files checked
Review mode: full; reason: history
- Changeset: charts with many bars or points draw about a third faster: false; the same time on pages of four 50,000-bar charts, 20,000 bars, 20,000 scatter points and a 50,000-point line, and 12–17% faster only with a tooltip and legend.
- Changeset: React no longer logs render timings: verified; the new test fails on the base worker (106 and 297 timing calls) and passes on the head.
- Changeset and description: a page of four 50,000-point charts went from about 42 s to 29 s: the author's measurement; that page is not in the pull request, so it was not reproduced.
- Changeset and description: the written file is the same: verified; seven chart pages are byte-identical with the same warnings.
- Changeset: an experimental patch entry for the CLI: verified; tag, bump and contributor are right and the changeset check passes.
- Description: the render's 60-second limit: verified in the render's timeout constant.
- Description: React's development build logs each render for the Performance panel: verified; React DOM's client turns timings on as it loads when both timing functions exist.
- Description: in Node every record copies its props into a timing buffer: false in part; only re-renders with changed props carry a diff of them.
- Description: React DOM's client loads with the timing hook hidden, so React records nothing: verified by the new test.
- Description: the page's own warnings still reach the output: verified; a page warning and React's missing-key warning appear with both workers.
- Description: the command is experimental and its output does not change: verified; only the experimental render and theme editor commands start the worker.
- Description: four other pages unchanged and 45 pages within noise: the author's measurements; consistent with the unchanged pages measured here.
- Description: no new public API and no internal context: verified.
- Description: the listed test command: verified; 304 passed, 3 skipped.
- Description: stacked on the render's live-app change: verified; the base is that branch.
.changeset/render-no-render-timings.md: the blocking finding above.packages/cli/api/render/render.test.mjs: clear.packages/cli/foundation/render/page-worker.mjs: clear; non-blocking comment wording at lines 494-495.
5f7f9f6 to
6ff9147
Compare
There was a problem hiding this comment.
Approved pending CI: the render change holds up, and the release-note and worker-comment fixes from the last review are in. CI has not run on this head yet, since the pull request targets the live-app branch; it runs once the pull request targets main.
The new test fails without the change and passes with it, the render tests pass, and six chart pages write byte-identical files with the same warnings: bar charts with a tooltip and legend draw faster, and the others take the same time.
Claims and files checked
Review mode: full; reason: history
- Changeset: some large chart pages draw faster: verified; bar charts with a tooltip and legend drew 15–27% faster through the new worker.
- Changeset: most pages take the same time as before: verified; line, scatter, plain bar and small pages took the same time.
- Changeset and title: React no longer logs each render's timing while the render draws: verified; the new test counts 111 and 318 timing calls with the old worker and none with the new one.
- Changeset and description: a page of four 50,000-point charts went from about 42 s to 29 s: the author's measurement; that page is not in the pull request, so it was not reproduced.
- Changeset and description: the written file is the same: verified; six chart pages are byte-identical.
- Changeset: an experimental patch entry for the CLI: verified; tag, bump, named surface and contributor are right, and the changeset check passes.
- Description: the render's 60-second limit: verified in the render's timeout constant.
- Description: React's development build records each component render for the performance panel: verified; React DOM's client turns timings on as it loads when both timing functions exist.
- Description: in Node each logged re-render copies the props it changed into a timing buffer: verified; React attaches a diff of a re-render's changed props to the measure.
- Description: React DOM's client loads with the timing hook hidden, so React records nothing: verified by the code and the new test.
- Description: the page's own React warnings still reach the output: verified; a page warning and React's missing-key warning appear with both workers.
- Description: the command is experimental: verified; only the experimental render and theme editor start the worker.
- Description: four other pages and 45 pages keep their time, output and warnings: the author's measurement; not reproduced, and in line with the pages measured here.
- Description: the listed test command passes: verified; 304 passed and 3 skipped.
- Description scope checklist (one defect, no tagalong, no new public API, no internal context): verified.
- File
packages/cli/foundation/render/page-worker.mjs: clear. - File
packages/cli/api/render/render.test.mjs: clear. - File
.changeset/render-no-render-timings.md: clear.
6ff9147 to
74503fd
Compare
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI: hiding console.timeStamp while the render worker loads React DOM holds up, and the patch matches the version approved before the rebase. CI has not run on this head yet: its jobs found no room under the CI ceiling, so re-run all jobs.
The new test fails without the change and passes with it, the render tests pass, and chart pages write byte-identical files with the same warnings; pages whose charts carry a tooltip and legend draw faster, and the others take the same time.
Claims and files checked
Review mode: full; reason: rebase
- Changeset: some large chart pages draw faster: verified; chart pages with a tooltip and legend drew 19–35% faster through the new worker.
- Changeset and description: a page of four 50,000-point charts went from about 42 s to 29 s: the author's page is not in the pull request; a page of four 50,000-point line charts with a tooltip and legend drew about a third faster here too.
- Changeset: most pages take the same time as before: verified; plain bar and small chart pages took the same time.
- Changeset and title: React no longer logs each render's timing while the render draws: verified; the new test counts 113 and 320 timing calls with the old worker and none with the new one.
- Changeset and description: the written file is the same: verified; four chart pages are byte-identical through both workers.
- Changeset: an experimental patch entry for the CLI: verified; tag, bump, named surface and contributor are right, and the changeset check passes.
- Description: the render's 60-second limit: verified in the render's timeout constant.
- Description: the render draws with React's development build, which records each component render for the performance panel: verified; React DOM's client turns timings on as it loads when both timing functions exist.
- Description: in Node each logged re-render copies the props it changed into a timing buffer: verified; React attaches a diff of a re-render's changed props to the measure.
- Description: React DOM's client loads with the timing hook hidden, so React records nothing: verified by the code and the new test.
- Description: the page's own React warnings still reach the output: verified; a page warning and React's missing-key warning appear with both workers.
- Description: the command is experimental and its output does not change: verified; only the experimental render and theme editor start the worker.
- Description: four other pages and 45 pages keep their time, output and warnings: the author's measurement; not reproduced, and in line with the pages measured here.
- Description: the listed test command passes: verified; 305 passed and 3 skipped.
- Description scope checklist (one defect, no tagalong, no new public API, no internal context): verified.
- File
packages/cli/foundation/render/page-worker.mjs: clear. - File
packages/cli/api/render/render.test.mjs: clear. - File
.changeset/render-no-render-timings.md: clear.
A development build of React DOM logs every render to the Performance panel when console.timeStamp and performance.measure exist. The render's worker has no Performance panel, and Node copies the props a logged re-render changed into its user timing buffer, so a page of four charts of 50,000 points each spent most of its drawing time there (42 s -> 29 s; most pages take the same time). React DOM's client now loads with console.timeStamp hidden; the file the render writes is the same.
74503fd to
0bd6c47
Compare
There was a problem hiding this comment.
Approved pending CI: hiding console.timeStamp while the export worker loads React DOM holds up, and since the last review the patch only rebased and renamed the command in the release note to astryx experimental export, its current name. CI's run on this head was cancelled while it waited for room under the CI ceiling, so its build, typecheck and test jobs have not run: re-run it.
The new test fails without the change and passes with it, the render suites pass, and three pages write byte-identical files with the same warnings through the old and the new worker; a page of four 50,000-point line charts with a tooltip and legend drew about a third faster, and the other pages took the same time.
Claims and files checked
Review mode: full; reason: rebase
- Title and changeset: React no longer logs each render's timing while the export draws a page: verified; the new test counts 113 and 321 timing calls with the old worker and none with the new one.
- Changeset: an experimental patch entry for the CLI that names the affected command: verified; tag, bump, the command's current name and the contributor are right, and the changeset check passes.
- Changeset: some large chart pages draw faster: verified; a page of four 50,000-point line charts with a tooltip and legend went from about 16 s to 10 s.
- Changeset and description: a page of four 50,000-point charts went from about 42 s to 29 s, near the 60-second limit, and failed on a busy machine: the limit is verified in the render's timeout constant; the times and the failure are the author's measurement on a page not in the pull request, and the four-chart page measured here gained a similar share.
- Changeset and description: most pages take the same time as before: verified; a 20,000-bar chart page and a Core page with a small chart took the same time.
- Changeset and description: the written file is the same: verified; all three pages are byte-identical through both workers.
- Description: the render draws with React's development build, which records each component render for the performance panel: verified; React DOM's client turns timings on as it loads when both timing functions exist.
- Description: in Node each logged re-render copies the props it changed into a timing buffer: verified; React attaches a diff of a re-render's changed props to the measure.
- Description: React DOM's client loads with the timing hook hidden, so React records nothing: verified by the code and the new test.
- Description: the page's own React warnings still reach the output: verified; a page warning and React's missing-key warning appear with both workers.
- Description: the command is experimental and its output does not change: verified; only the experimental export and the experimental theme editor start the worker. The description still calls it
experimental render; it now answers toastryx experimental export, the name the changeset uses. - Description: four other pages and 45 pages keep their time, output and warnings: the author's measurement; not reproduced, and in line with the pages measured here.
- Description: the listed test command passes: verified; 361 passed and 3 skipped.
- Description scope checklist (one defect, no tagalong, no new public API, no internal context): verified.
- File
packages/cli/foundation/render/page-worker.mjs: clear. - File
packages/cli/api/render/render.test.mjs: clear. - File
.changeset/render-no-render-timings.md: clear.
- #12072 fix(templates): payment form and checkout wrap the summary below the form on a narrow first paint Author: Joey Farina <[email protected]> - #12274 fix(core): cap the Selector family's trigger-width list minimum at the viewport Author: josephfarina <[email protected]> - #12215 fix(cli): advise keeping one dependency when two packages declare one provider ID Author: Joey <[email protected]> - #12322 [experimental] export --reverse: use the project's own copy of an aliased file, or restore the page's copy with its paths entry Author: josephfarina <[email protected]> - #12403 docs(core): Text's as and PowerSearch's statusVariant list every value their types allow Author: Joey Farina <[email protected]> - #12494 fix(templates): dashboard templates use page sections, not cards, for page regions Author: Joey Farina <[email protected]> - #12282 fix(cli): theme build --check and doctor ignore which CLI release, and which command name, built a theme Author: Joey Farina <[email protected]> - #12420 fix(Chat): ChatToolCalls and ChatDictationButton without a required prop name it and the fix in development Author: Joey Farina <[email protected]> - #12205 fix(cli): equally scored icons put first one whose id the query names in full Author: Joey Farina <[email protected]> - #12455 fix(core): a theme sets the room between a checkbox or a switch and its label Author: josephfarina <[email protected]> - #12658 perf(cli): the first theme build after a CLI upgrade reuses the JavaScript it compiled from a theme's local modules Author: Joey <[email protected]> - #12323 [experimental] export: React logs no render timings while the export draws a page Author: Joey Farina <[email protected]>
|
Landed in #12713. |
User impact
A page of four charts of 50,000 points each took 42 seconds to render, close to the render's 60-second limit, and failed on a busy machine.
Problem and solution fit
React DOM's client now loads with the timing hook hidden, so React records nothing. React stays the development build, so the page's own React warnings still reach the render's output.
Expected behavior and authority
astryx experimental exportis experimental (spec:AST-017FR27). The output does not change.Smallest restoration
foundation/render/page-worker.mjs: React DOM's client loads with no render timings.Evidence
api/render/render.test.mjs: a page that counts the timing calls sees none.Scope
Testing
pnpm exec vitest run --project node packages/cli/api/render packages/cli/foundation/render.