vibescrobble! every agent, live on stage. vibescrobble.com

test(web): benchmark the board in Chromium at thousands of agents #812

Merged permadeath.com
targeting main from claude/perf-harness
Merged opened by and assigned to permadeath.com
targeting main from claude/perf-harness

web/dev/bench/board.mjs benchmarks the real board in Chromium at 500, 2,000, 5,000 and 10,000 agents, from the mock feed. At each size it measures three cameras: the whole board, one operator's household, and a close-up of five agents. It reports frame time (median and p95), frame gaps, CPU-profile self time by web/graph file and function, heap, DOM nodes and canvases. It serves web/ itself and drives Chromium over the DevTools protocol, with no npm dependency. It prints one table and writes the raw results as JSON, which is gitignored. web/dev/bench/README.md says how to run it and compare two runs. On NixOS, Playwright's Chromium lacks libraries, so the README runs it under nix shell nixpkgs#chromium.

The first run on main, in headless Chromium with software rendering (so the milliseconds are pessimistic and the ranking is what counts):

  • The board misses 60 fps at about 700 to 900 agents and 30 fps at about 1,500 to 1,900. At 2,000 agents frames take 35-46 ms, and at 10,000 228-319 ms.
  • Layout is 45-67% of frame time. layout.js:stepWorkNodes alone is 29%, a group loop that grows faster than the population, and the physics steps on every frame because births and deaths keep the board warm.
  • draw.js:collapses is 21%, walked several times per agent per frame.
  • Rasterisation is only 8-15% at 5,000 and over.

Nothing under web/graph/ changes here.

🤖 Generated with Claude Code

Commits 0