Feature Library
<0.01 CPU ms
A still of the Audience vote demo
Still
The live demo starts when it’s in view.Vote on the phone, run a round from the console or with Run a round · Make it a tie, drop the network · nothing leaves your browser

The room votes on their phones and the stage shows a live tally (bars or a ring) and an awards-style reveal: nominee cards, a drum roll, the winner, ties handled.

What it costs a frame

<0.01 ms
GPU
not used
CPU, median
<0.01 ms
CPU, 95th pct
0.04 ms
Draw calls
0
Weight
Light

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the demo running rounds on its own: the simulated crowd stepped every frame (240 voters over about four seconds), the tally rewritten once a frame, voting closed and the reveal played (nominees, drum roll, winner) at four times speed, then the next round. The in-page room server and the phone run alongside. Nothing runs between changes outside the bench. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed<0.010.04
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.020.12
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.010.08

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. An audience picks what the presenters show next
  2. Awards and "people’s choice" reveals
  3. Live polls in a talk or a meeting
  4. Rehearsing a show without a network
  5. A QR code for any short link
  6. A small anonymous vote server for an event

Pitfalls, in brief

  1. One vote per device is a promise kept by a random token in the phone’s storage: a private window or cleared storage is a new device.
  2. The operator secret belongs in the Worker’s environment (wrangler secret put), never in the repository or in the show’s page source.
  3. Rate limits live in the room’s memory: they reset when an idle room hibernates.
  4. Phones get only words: titles, subtitles, the question.
  5. A reveal freezes the counts.
4 more in brief
  1. Switching source keeps the numbers on stage; a manual source starts from them.
  2. The QR encoder stops at version 10 (213 bytes at level M, 151 at Q): plenty for a join link, not for a paragraph.
  3. The reference server has tests for its logic (through stand-in sockets), not a deployment: run it with wrangler dev against a phone before the night, and read guide.md’s checklist.
  4. Rooms delete themselves after ROOM_TTL_HOURS (48 by default), and at once when the operator ends the event.
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

Written for the library. Fully custom code.

ISO/IEC 18004:2015, QR Code bar code symbology: byte mode, the error-correction block table, Reed–Solomon over GF(256), BCH-coded format and version information, the eight masks and their penalty rules: implemented here from the standard, with its published tables and worked examples as test vectors

WAI-ARIA Authoring Practices Guide (W3C): the Radio Group pattern (native radios in a fieldset) on the phone and in the console, and announcements through a polite live region. Written here from scratch.

Cloudflare Durable Objects: WebSocket hibernation: acceptWebSocket, socket attachments and auto-responses as documented; the server code is the library’s own

Marsaglia, Xorshift RNGs (2003): the seeded generator behind the simulated crowd

Hamilton’s largest remainder method: shares that add up to exactly 100

votingpollslive tallyrevealawardsQR codeWebSocketreconnectCloudflare WorkersDurable Objectshibernationrate limitingprivacypresentationshowoperator consolelive regionaccessibilitykeyboardtouchrtldomcssno dependencies

Near it in the frame