Measure actual canvas performance with an isolated production frontend

This commit is contained in:
2026-11-10 18:01:02 +08:00
parent b7fe214d97
commit afccb8c95c
3 changed files with 30 additions and 6 deletions
+14
View File
@@ -922,3 +922,17 @@ clock; eager subscription failures also dispose their queue. This batches source
notifications, not every React render: another store/prop update may read the
current Root before the pending frame. Session and element subscriptions retain
their existing routing and immediate read semantics.
The actual-page performance harness defaults to development webpack. Add
`--production` together with `--performance` to build its isolated application
with `next build --webpack` and serve that completed build with `next start`.
The report identifies the mode and records build time separately from browser
copy timings; build failure aborts before measurement. Example:
```sh
HEADLESS_PERFORMANCE_COUNT=10000 HEADLESS_PERFORMANCE_REPORT=/private/tmp/headless-production-10000.json node tests/headless/renderer.integration.mjs --performance --production
```
Both modes retain the same full-copy, upper-canvas edge, synchronization and
far-card viewport assertions. Production here means an optimized frontend served
against the fixture HTTP service; it does not claim production Foundry validation.