The per-tick `worker.postMessage(srcPaths)` structured-clones the entire path snapshot, including `activeRoute.waypoints`. Two competing ways to eliminate that cost:
- Option A — remove the worker. Call `calcs()` inline on the main thread. Eliminates IPC overhead and the worker's V8 heap. Simpler if inline calc latency on a worst-case tick stays well under one delta interval.
- Option B — split the envelope. Keep the worker but split `srcPaths` into a stable envelope (`waypoints` + `waypointsVersion`, sent only on bump) and a tick envelope (vessel position, COG, SOG, etc., sent every tick). Worker holds the last stable envelope by reference.
A/B both options against the dispatch benchmark from #24 on Pi 3-5 hardware and pick one.
The per-tick `worker.postMessage(srcPaths)` structured-clones the entire path snapshot, including `activeRoute.waypoints`. Two competing ways to eliminate that cost:
A/B both options against the dispatch benchmark from #24 on Pi 3-5 hardware and pick one.