Skip to content

Benchmark Web Worker peer transport overhead - #1297

Closed
ale18V wants to merge 2 commits into
fix/worker-model-recoveryfrom
bench/worker-peer-transport
Closed

ale18V wants to merge 2 commits into
fix/worker-model-recoveryfrom
bench/worker-peer-transport

Conversation

@ale18V

@ale18V ale18V commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

Follow-up to #1287, stacked on #1295 to inherit its lifecycle fixes and browser-test startup timeout. A real-worker harness separates MessagePort dispatch, copy/transfer, cloning and the production peer bridge, then compares direct and bridged WebRTC loopback exchange. In one Chrome/Linux run, one-peer median WebRTC RTT increased by roughly 3–6% for 1–64 MiB payloads; the small CPU training workload reduced maximum page-timer lag from about 36 ms to 1 ms. The recorded report includes raw JSON, hardware metadata, the measured source revision and limitations. Validation covers 195 recorded measurements across three repetitions, payload integrity/byte counts, lint, formatting, type checks, dependency checks and the production build.

Technical plan

Warm up each path and rotate/reverse order across repetitions, measuring realistic payloads with one or four peers using the unmodified production adapter and WebRTC peers. A separate Titanic CPU training-and-exchange workload starts both paths from identical serialized weights and reports training, encoding, exchange, applying and page responsiveness. Keep the benchmark out of ordinary Cypress runs and the production app bundle, and provide commands to run it and summarize its JSON report.

Deviations from plan

None.

Todo

Repeat on other hardware and browsers, measure peak memory separately, and validate remote-network/full Disco sessions and larger GPU models before generalizing the results.

@ale18V
ale18V force-pushed the bench/worker-peer-transport branch from d76e6cc to 0f455df Compare November 18, 2026 15:09
@ale18V
ale18V changed the base branch from feat/training-worker-page-client-alternative to fix/worker-model-recovery November 18, 2026 15:09
@ale18V
ale18V marked this pull request as ready for review November 18, 2026 15:10
@ale18V
ale18V marked this pull request as draft November 18, 2026 15:36
@JulienVig JulienVig closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants