Performance
Measure representative pages before broad activation. Run the browser benchmark to compare individual mounts and scopes.
Run the benchmark
Build first, install the Playwright test dependencies and browsers, then execute the benchmark on Chromium, Firefox and WebKit. CI also builds the pinned v0.4.4 release (commit 1f90a0a) separately and compares individual controllers on 100 short and 24 long paragraphs. JULIYA_BASELINE_DIST optionally points to a built v0.4.4 dist directory for local comparisons. The old version has no scope API; same-version individual mode remains the scope baseline, and the historical correctness results are observational.
pnpm build
pnpm --dir test/next-app install --frozen-lockfile
pnpm --dir test/next-app exec playwright install chromium firefox webkit
node test/next-app/scope-benchmark.mjsMeasurements
Compare individual controllers with scopes for 10, 100 and 500 short paragraphs and 24 long paragraphs in four languages. Interleave the two modes across three repetitions and report median timings, measurements, Canvas allocations, mutation/resize deliveries, scope scans, listener cleanup and supported long task/layout shift observations. The long workload exercises a real font load, inline style, locale and content changes, unchanged refresh and remount. Source, width and restored markup are correctness checks. Short workloads verify that the generated break positions change on resize and match a fresh scope at that width, outside the timed phases. They enforce at most eight scans through resize and a paired median measurement-count ratio no higher than 1.10. The 500-paragraph paired median timing budget is 2× the individual mode and reported as an observation, not a time-based CI failure. Optional nonstandard usedJSHeapSize snapshots are not proof of retained memory or garbage collection; cleanup is verified through deterministic observer/listener counts and zero work after destroy. Chromium also reports CDP heap and DOM counters after explicit garbage collection, with three warm-up cycles and ten measured mount/destroy/DOM-removal cycles; this is a bounded observation, not a cross-engine memory guarantee. In CI run 46368371287, the 500-paragraph scope-to-individual resize ratios were Chromium 1.04×, Firefox 1.01× and WebKit 1.02×; scope scans had a median of four. This is not a speed guarantee.