Performance
Stress-tested with 1000 simultaneous bot users on a single board, all moving cursors.
Stress test results
| Metric | Result |
|---|---|
| Connections | 1000/1000 (100%) |
| Connect time | ~8 seconds |
| FPS (1000 cursors) | 60 |
| p50 frame time | 16.7ms |
| p95 frame time | 18.0ms |
| JS heap | 9.5 MB |
| Server responsive | Yes |
Key optimizations
- Canvas 2D instead of SVG for cursors (zero DOM diffing per frame)
- Bitmap label cache - user names rendered to offscreen canvases once, then
drawImage()per frame - rAF cursor throttle - outbound cursor moves coalesced to one per animation frame
- Per-topic broadcast budget - server caps cursor broadcasts at ~60/sec per board regardless of user count
- RAF event batching - incoming WebSocket events coalesced into one Svelte store update per frame
- Batched publish - arrangement actions publish all note updates + activity in a single
ctx.batch()call instead of N+1 individual publishes - Batch SQL - arrangement actions update all notes in a single
unnest()query instead of N+1 - Direct DOM drag - note dragging bypasses Svelte reactivity during the drag for smooth touch performance
- Delayed handoff - local drag position held for 300ms after release to avoid snap-back jitter
For OS-level tuning (sysctl, ulimits, conntrack), see the svelte-adapter-uws production docs.
Was this page helpful?