tl/scenes
Your Name 48e154d53c perf: hand a joiner the room instead of asking everyone to answer
A joining peer learnt the roster by announcing itself and having every member
reply with their state. That's one broadcast per member — O(N^2) messages for
a room of N — and the in-memory channel layer caps each connection's queue at
100 and drops the overflow silently. Measured with 100 synthetic peers: every
peer ended up seeing only 58-96 of the other 100, permanently. Not cosmetic —
joinable? and mirrors? both read the roster, so you couldn't join someone you
couldn't see, and a mate whose state was dropped wouldn't move you.

The consumer now keeps the roster it is already relaying and hands a newcomer
a snapshot in one message, so a join costs two broadcasts instead of N. Same
100 peers: roster complete and identical for everyone, 2310 messages sent down
to 349, 72.6k deliveries down to 38.6k, server 30% -> 21% of one core, nav
latency unchanged at ~14ms p50.

This is a cache of relayed gossip, not a source of truth: parties are still
worked out entirely in the browsers, and the server still decides nothing
about them. It is process-local, like the in-memory channel layer it sits
next to — if that ever moves to Redis for multiple workers, this moves too.

Measured ceiling for the pathological case (everyone in ONE party, all
mirroring each other): 100 peers ~14ms p50 at 21% of a core, 150 still ~14ms
at 27%, 250 degrades to ~450ms p50 with the roster incomplete again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 17:01:33 -04:00
..
management fix: thumbnail parser overflow, autostop-killed jobs, unified playhead 2026-06-30 09:48:08 -04:00
migrations Script pane, realtime peer sync, and logout button 2026-06-29 10:52:46 -04:00
__init__.py Add Django backend: users, admin, OTIO + scene persistence 2026-06-28 23:45:49 -04:00
admin.py thumbnails 2026-06-29 03:19:47 -04:00
apps.py Add Django backend: users, admin, OTIO + scene persistence 2026-06-28 23:45:49 -04:00
attribution.py Attribute annotations and scene saves to users 2026-06-29 00:12:13 -04:00
consumers.py perf: hand a joiner the room instead of asking everyone to answer 2026-09-17 17:01:33 -04:00
models.py Script pane, realtime peer sync, and logout button 2026-06-29 10:52:46 -04:00
routing.py Script pane, realtime peer sync, and logout button 2026-06-29 10:52:46 -04:00
tests.py perf: hand a joiner the room instead of asking everyone to answer 2026-09-17 17:01:33 -04:00
thumbnails.py fix: thumbnail parser overflow, autostop-killed jobs, unified playhead 2026-06-30 09:48:08 -04:00
urls.py feat: upload a script PDF from the script pane 2026-06-30 01:09:16 -04:00
views.py fix: live-sync drawings/notes; cut per-frame sub cost; pen color+size 2026-07-01 19:29:32 -04:00