Making it fast
Where the speed work stands and how a game loads, with measured numbers.
The story, with before and after charts, is in the devblog: Client speed: loading and drawing. Every measurement: Client speed measurements.
How it works now
- Loading: the page's HTML draws the top bar at once, then a small core, then the page you opened. The game client loads without the server's room and bots; the room code (122 KB compressed) comes only when a room runs in your tab.
- Service worker: its install keeps the first page's files (61 files, 0.67 MB); the rest (about 5.6 MB) comes once a page other than a game is idle, and pauses during games.
- A first visit to the Sandbox on a 5 Mbps line with the CPU slowed 4 times: first game frame 5.6 s, 1.82 MB downloaded (16 Nov 2026, a busy machine).
- The code ships minified only.
- Drawing: Auto quality turns drawing down one step at a time while a game runs slow, keeps only steps that measured a gain, and moves the netcode to Light as its last step (switch AUTO3).
Last checked: 16 Nov 2026.
Key decisions
| Decision | Why | Rejected | Date |
| The room code loads only when a room runs in your tab | The game's chunk went from 350 to 122 KB compressed | None recorded | 16 Nov 2026 |
| The service worker keeps only the first page's files at install, the rest when a page is idle | The install takes only what the first page uses; the rest pauses during games | None recorded | 16 Nov 2026 |
| Minified only, no obfuscator | Obfuscated, the per-frame modules cost the busy frame 10 to 25% of its script time at 4 to 6 times slower CPU, and the page about 390 KB | Keeping the obfuscator | 16 Nov 2026 |
| Auto quality keeps a step only when it measured a gain | A step stays if it bought 1 ms of frame time at p95 or cut missed frames by 40% | None recorded | 16 Nov 2026 |
| One-off moments don't count toward a step down | Auto stepped players down on every capture celebration | Counting celebrations, blasts and respawns | 16 Nov 2026 |
| A deploy keeps the name of every file it didn't change | What a browser already has stays good | Renaming every file each deploy | 16 Nov 2026 |
Changes that mattered
- 17 Nov 2026: pages at rest: an idle Home, Store and Profile draw no frames (Home was about 130 a second), and the Store scrolls smoothly with the pointer over its cards. The bug
- 16 Nov 2026: Auto by measured gain, with calm moments and stepping back up: on a busy 4 v 4 with the CPU slowed 10 times, missed frames went from 230 and 71 a minute to 20 and 42. Faster drawing on slow computers
- 16 Nov 2026: Auto no longer steps down on capture celebrations. The bug
- 16 Nov 2026: a deploy no longer renames nearly every file. The bug
- 16 Nov 2026: the obfuscator removed: about 390 KB less script. Removing the obfuscator
- 16 Nov 2026: a first visit into the Sandbox: first game frame 7.4 s to 5.6. Faster first load into a game
- 15 Nov 2026: physics in WebAssembly: on the ball pit with the CPU slowed 10 times, a step 2.08 ms to 0.73. Making it fast
Pages at rest
An idle page draws nothing. No animation runs forever, every animation ends by itself within 20 s, and 3 idle seconds draw no frames and ask for no animation frames. A look’s preview moves only while the pointer is on its card, or for 3 s after it comes on screen outside a card. Checked in real Chrome at 1920 by 1080 at 2x (scripts/home-scroll-e2e.mjs, scripts/store-profile-idle-e2e.mjs, scripts/voice-idle-e2e.mjs).
| Page, left alone | Before | Now | What kept drawing |
| Home | about 130 frames a second (434 in 3 s), the GPU process about a whole core | 0 frames, GPU 0.1%, page 0.3% | three blurred lights drifting forever, the hero picture zooming under a blurred panel, a backdrop blur on every panel |
| Store | 576 frames in 2 s, about 500 animation frames a second, GPU 61% | no frames (at most 2 in 3 s) | every card’s preview |
| Profile | about 400 animation frames a second | no frames | its looks and room previews |
| In a group’s voice call alone, any page | 60 frame callbacks and 20 timer ticks a second, page 5 to 8% | 0 frame callbacks, about 1 timer tick a second | a frame loop for the talk lights |
| Scrolling | Before | Now |
| Home | 7.5 layers drawn a frame, every panel blurred again | 2.1; the GPU’s main thread busy about a quarter as long |
| Store, wheel over the cards (CPU 4 times slower) | frame p95 83 ms, against 17 ms with the pointer beside the cards | a card under the pointer starts its animation only once the page has been still 200 ms |
The look is the same: under 0.1% of Home’s pixels differ by more than 16 of 255.
Stylesheets that leak: a page’s stylesheet stays loaded for the rest of the visit, so a rule on a bare class name restyles any other page using that name (the friends list after a Store visit, and seven more). scripts/css-leak-test.ts reads every stylesheet and fails when two files style the same top-level class with different rules. A rule is safe when it starts with its component’s root class or uses a name of its own; the list of known pairs may only shrink.
Known limits and next
- Busy maps are hard on slow computers in Classic and Instant, because your browser runs the physics too.
- Offline games work only once the service worker has the rest of the site.
- Load times were measured on a busy machine and move 100 ms or more between runs.
Where it starts
Measured 2026-11-15 on an M3 Max with Chrome, the CPU slowed down to stand in for slower laptops:
| Map | Normal speed | 10 times slower |
| Ball pit | 60 fps, JS 0.9 ms a frame | 40 fps, JS 9.7 ms a frame |
| Maze map | 60 fps, JS 0.6 ms a frame | 60 fps, JS 4.0 ms a frame |
Busy maps are hard on slow computers because your browser runs the physics too (in Classic and Instant). On the ball pit map at 10 times slower, physics took 3.6 ms of the 9.7.
What changed
- First load: pages load a small core first. On a slow connection the devblog shows its text in 2.2 s instead of 4.9.
- Light netcode: no physics in your browser at all, for slow computers. See Netcode.
- Game rooms: ticks run on time and updates are about 30% smaller. See A game tick.
- The database: a game end takes 12.5 ms instead of 48.5. See Data and saving.
- Physics in WebAssembly: Box2D version 3. On the ball pit map with the CPU slowed 10 times, a physics step takes 0.73 ms instead of 2.08, and replaying after an update about 2.3 times less. A test steps both engines tick by tick: movement and wall bounces match to 0.0001 tiles.
- Replay skip: an update that matches prediction exactly skips the replay. With the CPU slowed 10 times, the replay was 15 to 25 ms a frame on the lab maps. See Netcode.
- Auto quality: steps down on stutter too, keeps only steps that measured a gain, waits for calm moments and steps back up. See Auto quality.
- No obfuscation: the code ships only minified; obfuscated, the per-frame modules cost the busy frame 10 to 25% of its script time at 4 to 6 times slower CPU, and the whole page about 390 KB. See Removing the obfuscator.
- Sleeping piles: ball pits at rest leave the solver. On the Chromebook profile Lab: Big went from 21 to 42 fps, Hangout from 34 to 39. See A game tick.
- The first game: a first visit straight into the Sandbox draws its first frame sooner and downloads less. See Loading a game.
Auto quality
Auto turns drawing down one step at a time while a game runs slow, and keeps only what helps. (It was off for a few hours on 16 Nov 2026, after it stepped players down on capture celebrations; it came back with the calm rules below.)
- Calm: one-off moments don't count: a capture's celebration (3.5 s), a bomb's blast (1.5 s), a respawn (1.2 s), and the first 3 s of a map, a game or the page coming back. A step down needs two 15 s windows in a row over the line, and goes on only at a calm moment: your ball popped or just back, the countdown, or 2 s with nothing happening and no flag on you.
- Back up: after 60 s smooth the last step comes back off at a calm moment; if the next window isn't smooth it goes on again and the wait doubles, up to 5 minutes. A new game and a new visit start one step up from where the last one ended.
- Two triggers: frames slower than 58 fps at the 95th percentile, or stutter: more than 20 missed frames a minute, counted over 15 s. A missed frame takes over 1.5 times the screen's frame interval; a smooth game reads 0 to 12 a minute.
- Order by kind of computer: with a graphics card, no page effects first (it saved main-thread time in every scene measured, 26% on average), then on a 2x screen 1x pixels, then 75% and 85% size and the plain backdrop, then the rest. 1x pixels is never tried on a 1x screen. A page drawn without a graphics card starts with no page blur (the frosted bars over the game cost its compositor 240 to 300 ms a second), then 85% size and the plain backdrop.
- Each step is measured: 1 to 6 s after it goes on, against the 6 s before. It stays if it bought 1 ms of frame time at the 95th percentile or cut missed frames by 40%; otherwise it goes back off and the next one is tried at the next slowdown. After 20 smooth seconds the last step comes back off to check it's still needed.
- Remembered: each device keeps its steps and what each one bought. The next visit starts with the steps that helped there, and passes over ones that bought nothing until a day later.
- Light netcode: with the netcode on Automatic (the default), once nothing else is left to try and prediction itself is the heavy part, Auto switches to the Light netcode at a calm moment, and back to Classic when the computer keeps up again. Each ball eases from where it was drawn, so nothing jumps.
Measured 16 Nov 2026 on a busy 4 v 4 with the CPU slowed 10 times: missed frames 230 and 71 a minute before, 20 and 42 after; the main thread 597 and 549 ms a second before, 338 and 412 after. The switch is AUTO3. More: Faster drawing on slow computers.
Loading a game
- The page. Its HTML draws the top bar at once, then a small core loads, then the page you opened.
- The game's code. The game client loads without the server's room and bots; the room code comes only when a room runs in your tab. That chunk went from 350 to 122 KB compressed.
- The room's worker. The Sandbox and the tutorial run their room in a Web Worker. It starts as soon as the address is one of those pages, so its script and the physics load while the page's own code does, and the game takes it when ready.
- The physics. The WebAssembly is fetched and compiled as it streams in, right after the first code runs.
The service worker keeps the site in your browser:
- Its install keeps only the first page's files (61 files, 0.67 MB), taken from your browser's cache when the page already has them.
- The rest (about 5.6 MB) comes once a page other than a game is idle, and pauses during games. After that, offline games work.
- A file that isn't kept yet is answered as it downloads and kept in the background.
- A deploy keeps the name of every file it didn't change, so what you have stays good.
Measured 16 Nov 2026 on a 5 Mbps line with the CPU slowed 4 times, a first visit to the Sandbox: first game frame 7.4 s before, 5.6 s after, 2.39 MB downloaded before, 1.82 after. The machine was busy (load average 15 to 20), so the times move 100 ms or more between runs. More: Faster first load into a game.