# Real-app performance capture

Environment: Linux x86_64, Chromium 158, Vite dev, 1280 x 800 CSS viewport (recording uses 2x device pixels), dark appearance. Both checkouts run on the same VM with fresh, separate databases and Replay (dev), model showcase. No production data, mocks, source modifications, CPU throttling, or production builds.

Base: a0f03a6ed600965ec99b059eec4ee2c393e0eff1 (merge-base of origin/main and head).
Head: 0b93d61a80f315177a374b2b2ffc03508ddaa444.

1. Install each checkout with `vp i`; start each with `T3CODE_DEV_SEED=0 vp run dev`. Keep their printed ports and pairing links private.
2. Run `python3 seed.py <data-directory>` once. Use the same generated file for both commits.
3. In each checkout run `node apps/server/src/bin.ts project add <data-directory>/project --base-dir <checkout>/.t3`.
4. In each checkout run `node apps/server/src/bin.ts thread start --provider devReplay --model showcase <data-directory>/project 'Open [big.txt](<data-directory>/outside/big.txt)' --base-dir <checkout>/.t3 --json --wait`, expanding the absolute paths in the message.
5. Pair each browser tab to its own server. Navigate directly to `/<environmentId>/<encoded-threadId>` (environmentId comes from `/.well-known/t3/environment`). Expand the user message, click the big.txt link, and wait for the read-only preview to render. Keep the same viewport, panel width and theme on both sides. Allow at least eight seconds after initial rendering before measuring.
6. Evaluate the contents of measure.js in the tab. This instruments the existing Noble SHA256 prototype's update method, delegates to the original method, and counts/times only 1 MiB calls whose stack includes fileContentRevision. The SHA-256 algorithm and application source are unchanged. The timed interval includes synchronous button.click() and two requestAnimationFrames; the 400 ms settling wait is outside that interval.
7. Evaluate `await window.measureWrap('base-1')`, `base-2`, `base-3` on base and `head-1`, `head-2`, `head-3` on head. Each call alternates the real wrap button twenty times and verifies its label changes. No sample is discarded. `window.measurements` is the raw output captured in results.json.
8. Start browser recording, run the same twenty-toggle call labelled `base-recorded` or `head-recorded`, stop recording. These separate samples are retained in results.json and excluded from the three-batch timing summary. On head the recording was between batches 2 and 3; on base it followed batch 3.
9. Recordings are cropped to the unchanged right preview panel to omit the machine label in the sidebar, scaled from 1080x1600 to 540x800, and given a 50 px commit caption above the app. No frames are removed or retimed. Both recordings visibly alternate wrapped and unwrapped lines.

Three-batch median of medians: base 30.40 ms, head 16.35 ms (46.2% lower). Improvement 14.05 ms exceeds base batch-median range 6.95 ms and head range 0.20 ms. Base batch medians: 25.45, 30.40, 32.40 ms. Head: 16.40, 16.20, 16.35 ms. Base hashes once for every toggle (60/60); head hashes zero times (0/60). Median measured SHA256.update time: base 11.65 ms, head 0 ms. Recorded batches agree: 30.70 vs 15.80 ms; hashes 20 vs 0.

These timings describe this dev environment, not production latency. The two-frame endpoint is the report's interaction metric, not a browser paint trace. Prototype instrumentation adds a small amount of counting/clock overhead to hash calls. Workspace-folder/path/text-change cache invalidation was not exercised; this capture proves the unchanged-file wrap interaction.
