mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-19 09:34:07 +00:00
Measures per-call wall time of applyToText sync vs through a worker_threads round-trip across realistic pad sizes (1KB..2MB). Result: worker offload is NEVER net-positive — postMessage structured clone of the text string is the dominant cost. At 1KB worker adds +244% overhead; at 2MB +326%. The string serialization across V8 isolate boundaries kills the win for the per-call offload model. Implication for #7756 architectural next-step: per-call worker offload is not viable. The right shape is per-pad worker isolation (one pad in one worker; the main thread is a router) so serialization happens once at pad handoff rather than per changeset. Files: - src/scaling-bench/applyToText-bench.ts — main benchmark - src/scaling-bench/applyToText-worker.mjs — worker entry Run with: cd src && node --import tsx scaling-bench/applyToText-bench.ts Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| locales | ||
| node | ||
| scaling-bench | ||
| static | ||
| templates | ||
| tests | ||
| .eslintrc.cjs | ||
| ep.json | ||
| etherpad_icon.svg | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
| web.config | ||
Ignore this file and see the file in the base installation folder