prototype-pixi-perf: add real-hardware benchmarks (laptop WebGL/WebGPU, Note 10) and findings

Label SwiftShader table as not representative; refute 200-strokes fps drop as SwiftShader artifact.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 22:11:13 +01:00
co-authored by Claude Haiku 5.5
parent 5ad595b01b
commit b7b4e9ed58
+169 -26
View File
@@ -13,10 +13,13 @@ devbox run -- npm run dev -- --host # reachable from LAN
devbox run -- npm run build # tsc + vite build
```
URL params: `?renderer=webgl|webgpu` (prefer, not force: Pixi falls back to WebGL silently if WebGPU is unavailable, so check the overlay / benchmark header for `requested X → fallback`), `?res=1` (canvas resolution, default min(dpr,2)),
URL params (joined with `&`, e.g. `?renderer=webgpu&res=1&bench=1`): `?renderer=webgl|webgpu` (prefer, not force: Pixi falls back to WebGL silently if WebGPU is unavailable, so check the overlay / benchmark header for `requested X → fallback`), `?res=1` (canvas resolution, default min(dpr,2)),
`?bench=1` (auto-run benchmark on load), `?benchMs=5000&warmMs=700`.
Use the dev server (port 5173), not the stale 4173 preview build.
WebGPU on Linux Chrome: launch with `--enable-unsafe-webgpu --enable-features=Vulkan`, then confirm WebGPU is listed as enabled at `chrome://gpu`.
WebGPU on Linux Chrome (what actually worked): set these at `chrome://flags`, then relaunch Chrome:
`#enable-vulkan`, `#enable-unsafe-webgpu`, `#ignore-gpu-blocklist`.
CLI flags (`--enable-unsafe-webgpu --enable-features=Vulkan`) were overridden by the NixOS wrapper / an already-running Chrome process. Confirm WebGPU is enabled at `chrome://gpu`.
Controls (top right): map size, tile size override (auto = GPU max texture), local map image, grid on/off + cell size, token count,
chaos, HP churn, culling, tool (move / pen), +200 random strokes, Run benchmark (markdown table in the textarea; copy button).
@@ -25,23 +28,27 @@ Mouse: wheel = zoom, drag = pan / drag a token, pen tool: LMB draws, RMB/MMB pan
## Test on mobile
`devbox run -- npm run dev -- --host`, open `http://<LAN-IP>:5173` on the phone/tablet (same network; open the firewall for 5173 on NixOS if needed:
`networking.firewall.allowedTCPPorts`). Then use the on-screen overlay and the benchmark button. Not done in this session (no device available).
`networking.firewall.allowedTCPPorts`). Then use the on-screen overlay and the benchmark button.
Done: Galaxy Note 10 (SM-N970F), WebGL, Chrome 156 Android. See benchmark (D) below. Not done: other phones, tablets, iOS.
## Headless benchmark (what produced the table below)
## Headless benchmark (software GL, NOT representative)
`bench.mjs` drives chromium (from devbox) via playwright-core with SwiftShader (software GL):
`bench.mjs` drives chromium (from devbox) via playwright-core with SwiftShader (software GL). Only useful as a harness smoke test; real numbers come from the in-page button on real hardware (see Benchmark below).
```sh
devbox run -- npm run build && devbox run -- npx vite preview --port 4173 &
devbox run -- bash -c 'CHROMIUM=$(which chromium) node bench.mjs http://localhost:4173/'
```
## Benchmark (headless Chromium 155, SwiftShader SOFTWARE GL, 1280x720, res 1, WebGL2, maxTex 8192)
## Benchmark
**CAVEAT: this is CPU-emulated GPU. Absolute numbers are NOT representative of any real GPU. Only the relative shape is informative.
No real-GPU, WebGPU or mobile numbers were collected; run the in-page button on target hardware and replace this table.**
fps is capped at 60 (rAF). `js ms` = JS time per frame measured after Pixi's render call; with software GL the driver blocks inside draw calls so it is inflated at high token counts.
Scenario = view fitted to whole map (so small maps show all tokens on screen, large maps show only a fraction), chaos on, grid on, cull on, 5 s each after warmup.
Scenario for all runs = view fitted to whole map (so small maps show all tokens on screen, large maps show only a fraction), chaos on, grid on, cull on, 5 s each after 700 ms warmup.
fps is capped at 60 (vsync / rAF), so **fps is not a headroom metric on real GPUs: use `js ms` (JS time per frame measured after Pixi's render call) as headroom**. Frame budget is 16.7 ms.
### Software GL (headless Chromium 155, SwiftShader, 1280x720, res 1, WebGL2, maxTex 8192) — NOT REPRESENTATIVE
**CAVEAT: CPU-emulated GPU. Absolute numbers and the shape are artifacts of SwiftShader. Kept only as the first harness run; superseded by the real-hardware runs (A)-(D) below.**
With software GL the driver blocks inside draw calls, so `js ms` is inflated at high token counts.
| map | map path | tokens | strokes | fps | avg ms | p99 ms | worst ms | js ms | frames |
|---|---|---|---|---|---|---|---|---|---|
@@ -68,6 +75,128 @@ Scenario = view fitted to whole map (so small maps show all tokens on screen, la
| 4096 | single | 50 | 200 | 38.2 | 26.1 | 49.1 | 49.7 | 0.7 | 191 |
| 4096 | single | 500 | 200 | 28.2 | 35.4 | 45.5 | 111.9 | 4.7 | 141 |
### (A) Laptop, WebGL run 1 — Linux Chrome 155, AMD Radeon 780M
Renderer: webgl, GPU: ANGLE (AMD, AMD Radeon 780M Graphics (radeonsi phoenix ACO), OpenGL 4.6), maxTex 16384, res 1.203125, viewport 1877x1058, 5000ms/scenario (+700ms warmup), chaos on, grid on, cull on
UA: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36
| map | map path | tokens | strokes | fps | avg ms | p99 ms | worst ms | js ms | frames |
|---|---|---|---|---|---|---|---|---|---|
| 2048 | single | 50 | 0 | 60.0 | 16.7 | 18.3 | 19.1 | 0.4 | 300 |
| 2048 | single | 200 | 0 | 60.0 | 16.7 | 18.3 | 18.4 | 1.5 | 299 |
| 2048 | single | 500 | 0 | 60.0 | 16.7 | 18.1 | 18.3 | 2.9 | 300 |
| 2048 | single | 1000 | 0 | 60.0 | 16.7 | 18.0 | 18.1 | 5.3 | 300 |
| 2048 | single | 2000 | 0 | 60.0 | 16.7 | 17.9 | 18.4 | 9.7 | 300 |
| 4096 | single | 50 | 0 | 60.0 | 16.7 | 18.9 | 19.4 | 0.4 | 300 |
| 4096 | single | 200 | 0 | 60.0 | 16.7 | 18.3 | 19.5 | 1.6 | 300 |
| 4096 | single | 500 | 0 | 60.0 | 16.7 | 18.6 | 19.6 | 3.1 | 300 |
| 4096 | single | 1000 | 0 | 60.0 | 16.7 | 18.3 | 19.3 | 5.3 | 300 |
| 4096 | single | 2000 | 0 | 60.0 | 16.7 | 17.7 | 17.8 | 10.1 | 300 |
| 8192 | single | 50 | 0 | 60.0 | 16.7 | 18.2 | 18.4 | 0.5 | 299 |
| 8192 | single | 200 | 0 | 60.0 | 16.7 | 18.8 | 23.0 | 1.9 | 300 |
| 8192 | single | 500 | 0 | 60.0 | 16.7 | 18.1 | 18.4 | 3.7 | 300 |
| 8192 | single | 1000 | 0 | 60.0 | 16.7 | 18.3 | 18.5 | 6.1 | 300 |
| 8192 | single | 2000 | 0 | 60.0 | 16.7 | 17.8 | 17.9 | 10.5 | 300 |
| 16384 | single | 50 | 0 | 60.0 | 16.7 | 18.5 | 18.8 | 0.4 | 299 |
| 16384 | single | 200 | 0 | 60.0 | 16.7 | 18.3 | 18.4 | 1.5 | 300 |
| 16384 | single | 500 | 0 | 60.0 | 16.7 | 18.4 | 19.8 | 4.3 | 300 |
| 16384 | single | 1000 | 0 | 60.0 | 16.7 | 18.6 | 20.6 | 6.4 | 300 |
| 16384 | single | 2000 | 0 | 60.0 | 16.7 | 17.7 | 18.0 | 11.8 | 300 |
| 4096 | single | 50 | 200 | 60.0 | 16.7 | 19.0 | 19.5 | 0.7 | 300 |
| 4096 | single | 500 | 200 | 60.0 | 16.7 | 18.1 | 18.1 | 3.6 | 300 |
### (B) Laptop, WebGL run 2 — same header as (A)
Note: this run was launched as a WebGPU request (`?renderer=webgpu`) and fell back to WebGL, so the results are WebGL. Header same as (A).
Renderer: webgl, GPU: ANGLE (AMD, AMD Radeon 780M Graphics (radeonsi phoenix ACO), OpenGL 4.6), maxTex 16384, res 1.203125, viewport 1877x1058, 5000ms/scenario (+700ms warmup), chaos on, grid on, cull on
UA: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36
| map | map path | tokens | strokes | fps | avg ms | p99 ms | worst ms | js ms | frames |
|---|---|---|---|---|---|---|---|---|---|
| 2048 | single | 50 | 0 | 60.0 | 16.7 | 18.3 | 18.5 | 0.5 | 300 |
| 2048 | single | 200 | 0 | 60.0 | 16.7 | 18.3 | 19.0 | 1.7 | 300 |
| 2048 | single | 500 | 0 | 60.0 | 16.7 | 18.1 | 18.9 | 3.0 | 300 |
| 2048 | single | 1000 | 0 | 60.0 | 16.7 | 18.4 | 18.6 | 5.5 | 300 |
| 2048 | single | 2000 | 0 | 60.0 | 16.7 | 17.8 | 18.2 | 11.0 | 300 |
| 4096 | single | 50 | 0 | 60.0 | 16.7 | 18.1 | 18.3 | 0.6 | 299 |
| 4096 | single | 200 | 0 | 60.0 | 16.7 | 18.3 | 19.0 | 1.8 | 300 |
| 4096 | single | 500 | 0 | 60.0 | 16.7 | 18.2 | 18.5 | 3.3 | 300 |
| 4096 | single | 1000 | 0 | 60.0 | 16.7 | 18.2 | 18.5 | 5.6 | 300 |
| 4096 | single | 2000 | 0 | 60.0 | 16.7 | 17.7 | 18.1 | 11.3 | 300 |
| 8192 | single | 50 | 0 | 60.0 | 16.7 | 18.6 | 19.1 | 0.7 | 300 |
| 8192 | single | 200 | 0 | 60.0 | 16.7 | 18.7 | 19.3 | 2.4 | 300 |
| 8192 | single | 500 | 0 | 60.0 | 16.7 | 18.1 | 18.2 | 4.0 | 300 |
| 8192 | single | 1000 | 0 | 60.0 | 16.7 | 18.0 | 18.5 | 6.4 | 300 |
| 8192 | single | 2000 | 0 | 60.0 | 16.7 | 17.7 | 18.4 | 11.6 | 300 |
| 16384 | single | 50 | 0 | 60.0 | 16.7 | 18.2 | 18.8 | 0.5 | 299 |
| 16384 | single | 200 | 0 | 60.0 | 16.7 | 18.1 | 24.1 | 2.1 | 299 |
| 16384 | single | 500 | 0 | 60.0 | 16.7 | 18.0 | 18.5 | 4.5 | 300 |
| 16384 | single | 1000 | 0 | 60.0 | 16.7 | 17.8 | 18.3 | 6.7 | 300 |
| 16384 | single | 2000 | 0 | 60.0 | 16.7 | 18.1 | 18.6 | 11.7 | 300 |
| 4096 | single | 50 | 200 | 59.8 | 16.7 | 19.6 | 32.4 | 0.6 | 298 |
| 4096 | single | 500 | 200 | 60.0 | 16.7 | 18.4 | 18.4 | 3.6 | 300 |
### (C) Laptop, WebGPU — Linux Chrome 155, AMD Radeon 780M
Renderer: webgpu (requested webgpu, honored), GPU: ?, maxTex 8192, res 1.203125, viewport 1877x1058, 5000ms/scenario (+700ms warmup), chaos on, grid on, cull on
UA: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36
| map | map path | tokens | strokes | fps | avg ms | p99 ms | worst ms | js ms | frames |
|---|---|---|---|---|---|---|---|---|---|
| 2048 | single | 50 | 0 | 59.9 | 16.7 | 17.5 | 17.7 | 0.4 | 299 |
| 2048 | single | 200 | 0 | 59.9 | 16.7 | 17.7 | 18.3 | 1.6 | 299 |
| 2048 | single | 500 | 0 | 59.9 | 16.7 | 17.6 | 17.7 | 3.8 | 299 |
| 2048 | single | 1000 | 0 | 59.9 | 16.7 | 17.2 | 17.5 | 4.5 | 299 |
| 2048 | single | 2000 | 0 | 59.9 | 16.7 | 17.2 | 17.3 | 8.8 | 300 |
| 4096 | single | 50 | 0 | 59.9 | 16.7 | 17.6 | 20.2 | 0.4 | 299 |
| 4096 | single | 200 | 0 | 59.9 | 16.7 | 17.6 | 17.7 | 1.7 | 299 |
| 4096 | single | 500 | 0 | 59.9 | 16.7 | 17.5 | 17.6 | 3.7 | 299 |
| 4096 | single | 1000 | 0 | 59.9 | 16.7 | 17.0 | 17.7 | 4.5 | 299 |
| 4096 | single | 2000 | 0 | 59.9 | 16.7 | 17.7 | 17.7 | 9.0 | 300 |
| 8192 | single | 50 | 0 | 59.9 | 16.7 | 17.7 | 24.9 | 0.4 | 299 |
| 8192 | single | 200 | 0 | 59.9 | 16.7 | 17.7 | 20.4 | 1.6 | 299 |
| 8192 | single | 500 | 0 | 59.9 | 16.7 | 17.6 | 18.1 | 3.6 | 299 |
| 8192 | single | 1000 | 0 | 59.9 | 16.7 | 17.0 | 17.1 | 4.6 | 299 |
| 8192 | single | 2000 | 0 | 59.9 | 16.7 | 17.6 | 17.7 | 8.8 | 300 |
| 16384 | 4 tiles | 50 | 0 | 59.9 | 16.7 | 17.5 | 17.5 | 0.4 | 299 |
| 16384 | 4 tiles | 200 | 0 | 59.9 | 16.7 | 17.7 | 17.7 | 1.6 | 299 |
| 16384 | 4 tiles | 500 | 0 | 59.9 | 16.7 | 17.2 | 17.3 | 3.4 | 299 |
| 16384 | 4 tiles | 1000 | 0 | 59.9 | 16.7 | 17.3 | 18.5 | 4.9 | 299 |
| 16384 | 4 tiles | 2000 | 0 | 59.9 | 16.7 | 17.6 | 17.7 | 10.0 | 300 |
| 4096 | single | 50 | 200 | 59.9 | 16.7 | 17.7 | 17.7 | 0.9 | 299 |
| 4096 | single | 500 | 200 | 59.9 | 16.7 | 17.4 | 17.5 | 4.0 | 299 |
### (D) Samsung Galaxy Note 10 (SM-N970F, Exynos 9825 / Mali-G76), WebGL — Chrome 156 Android
Renderer: webgl, GPU: ANGLE (ARM, Mali-G76, OpenGL ES 3.2), maxTex 4096, res 2, viewport 411x730, 5000ms/scenario (+700ms warmup), chaos on, grid on, cull on
UA: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Mobile Safari/537.36
| map | map path | tokens | strokes | fps | avg ms | p99 ms | worst ms | js ms | frames |
|---|---|---|---|---|---|---|---|---|---|
| 2048 | single | 50 | 0 | 60.0 | 16.7 | 20.8 | 24.0 | 3.1 | 300 |
| 2048 | single | 200 | 0 | 60.0 | 16.7 | 19.8 | 20.6 | 4.5 | 300 |
| 2048 | single | 500 | 0 | 60.0 | 16.7 | 19.7 | 21.7 | 9.1 | 300 |
| 2048 | single | 1000 | 0 | 59.8 | 16.7 | 22.1 | 28.9 | 14.1 | 300 |
| 2048 | single | 2000 | 0 | 36.0 | 27.8 | 31.5 | 40.0 | 26.8 | 180 |
| 4096 | single | 50 | 0 | 59.8 | 16.7 | 19.8 | 30.1 | 2.8 | 299 |
| 4096 | single | 200 | 0 | 59.8 | 16.7 | 19.1 | 45.5 | 5.1 | 299 |
| 4096 | single | 500 | 0 | 60.0 | 16.7 | 18.8 | 20.3 | 9.0 | 300 |
| 4096 | single | 1000 | 0 | 60.0 | 16.7 | 19.3 | 21.0 | 13.8 | 300 |
| 4096 | single | 2000 | 0 | 34.6 | 28.9 | 30.4 | 30.8 | 28.1 | 173 |
| 8192 | 4 tiles | 50 | 0 | 60.0 | 16.7 | 18.5 | 19.2 | 3.0 | 300 |
| 8192 | 4 tiles | 200 | 0 | 60.0 | 16.7 | 18.9 | 20.4 | 4.5 | 300 |
| 8192 | 4 tiles | 500 | 0 | 60.0 | 16.7 | 19.3 | 28.8 | 9.1 | 300 |
| 8192 | 4 tiles | 1000 | 0 | 60.0 | 16.7 | 20.0 | 22.6 | 14.2 | 300 |
| 8192 | 4 tiles | 2000 | 0 | 35.1 | 28.5 | 30.7 | 32.7 | 27.7 | 176 |
| 16384 | 16 tiles | 50 | 0 | 60.0 | 16.7 | 20.1 | 23.6 | 3.0 | 300 |
| 16384 | 16 tiles | 200 | 0 | 60.0 | 16.7 | 18.7 | 19.8 | 4.9 | 300 |
| 16384 | 16 tiles | 500 | 0 | 60.0 | 16.7 | 21.0 | 25.7 | 9.8 | 300 |
| 16384 | 16 tiles | 1000 | 0 | 59.3 | 16.9 | 24.2 | 80.2 | 14.5 | 297 |
| 16384 | 16 tiles | 2000 | 0 | 32.3 | 30.9 | 32.6 | 33.4 | 30.1 | 162 |
| 4096 | single | 50 | 200 | 60.0 | 16.7 | 18.5 | 20.8 | 3.0 | 300 |
| 4096 | single | 500 | 200 | 60.0 | 16.7 | 19.4 | 24.0 | 9.5 | 300 |
## Techniques used (v8)
- **Map larger than max texture**: max texture read from the backend (`gl.getParameter(MAX_TEXTURE_SIZE)` / `device.limits.maxTextureDimension2D`);
@@ -84,22 +213,36 @@ Scenario = view fitted to whole map (so small maps show all tokens on screen, la
- **Input**: DOM pointer events on the canvas with a hand-rolled pan/zoom/pinch (pixi-viewport 6.0.3 declares `pixi.js >=8` peer, but token drag + pen + pinch needed custom handling anyway).
Pixi's federated event features are disabled; token hit test is an O(N) scan on press only.
## Findings
## Findings (real hardware)
Measured (software GL only):
- Token count dominates. With a 4096 map at fit zoom: 50 tokens 60 fps, 500 ~43 fps, 2000 ~19 fps. On SwiftShader that is largely fill/raster of BitmapText glyph quads and circle geometry, so it says little about real GPUs.
- Map size alone barely matters (2048 vs 16384 comparable at equal on-screen token count); the 2048 rows are *slower* only because all tokens are on screen at once while larger maps cull most of them. So culling works and tiling (2x2) cost no visible fps.
- Worst-frame spikes of ~30-50 ms show up at 99th percentile even at 50 tokens (likely software rasteriser/GC; unverified).
- **200 baked strokes did cost FPS here** (4096/50 tokens: 60 -> 38 fps; 4096/500: ~43 -> 28 fps). It does not meet the "no noticeable drop" criterion on this renderer. JS time per frame did not change, and a draw-call counter showed only ~4-7 draws/frame with strokes present, so it is not batching/CPU; hiding the stroke layer restored 60 fps.
Hypothesis (NOT verified): SwiftShader sampling of 200 distinct, large (e.g. 380x550) un-mipmapped textures minified at zoom 0.16 is slow in software, and a real GPU would not show it. Candidate fixes to try on real hardware if it reproduces: bake into shared atlas / merge strokes into per-region tiles, mipmaps on stroke textures, or smaller bake resolution when zoomed out.
- Live drawing of a 400-point stroke (checked with scripted mouse, visual only, no timing) rendered and baked to a correctly-aligned sprite.
Supersedes the SwiftShader-based findings of the earlier headless run.
Not measured / hypotheses:
- Everything on real GPUs, WebGPU (`?renderer=webgpu` untested), mobile/tablet, touch/pinch behaviour, HP churn and the Run-benchmark under churn (benchmark runs churn OFF; toggle is manual).
- Chaos at 2000 tokens costs per-frame `position.set` on 2000 containers: hypothesis that it is cheap on CPU; the `js ms` column is inflated by software GL blocking so it can't confirm.
**Verdict: PixiJS v8 renders a VTT-sized scene smoothly on the laptop (Radeon 780M, both WebGL and WebGPU) and on a 2019 phone (Note 10, WebGL).** Only per-frame JS for token updates under chaos scales in a way that matters.
Worries for a real VTT:
- BitmapText atlas is rasterised at one font size: labels go blurry when zoomed in (needs MSDF or a zoom-dependent font), and the installed glyph set is Latin/digits only; non-Latin names need `Text`/HTMLText or a bigger atlas.
- 16384 px maps on a device with maxTex 16384 take the single-texture path = ~1 GB of GPU memory; on mobile (maxTex often 4096-8192, small VRAM) tiling is required and memory, not fps, is the limit. Use the tile-size override to force tiling and check memory on a device. Tile seams at fractional zoom were not inspected.
- Per-stroke textures: 200 strokes = 200 separate GPU textures (see above); a real session with thousands of strokes needs atlasing/merging and texture GC planning. Very long single strokes are baked at reduced resolution (4096 cap) and will look soft.
- Tokens are one Container + 2 children each; 2000 tokens = 6000 scene nodes touched per frame in chaos mode.
- **200 baked strokes: refuted as a cost.** The SwiftShader result (4096/50 tokens 60 -> 38 fps) is a **SwiftShader artifact**, not a real-GPU effect. On real devices the strokes cost no fps; js ms rises by at most ~0.5 ms on the laptop, and the phone 4096/500 with strokes is 9.5 ms vs 9.0 ms without. Hypothesis about un-mipmapped stroke textures is moot for now.
- **Map size: ~free.** The tiled path was verified on real GPUs with no measurable cost:
laptop WebGPU maxTex 8192 -> 16384 map = 4 tiles; phone maxTex 4096 -> 8192 = 4 tiles, 16384 = 16 tiles.
Hypothesis: the WebGPU maxTex of 8192 (vs WebGL 16384 on the same GPU) is Pixi requesting default device limits, not the adapter max.
- **Baked strokes at 200: no measurable cost on any real device** (see above).
- **Only scaling cost = per-frame JS for token updates under chaos (all tokens moving).**
- Laptop 2000 tokens: js 9.7–11.8 ms (WebGL, runs A/B), 8.8–10.0 ms (WebGPU, run C). Both well under budget.
- Phone: 60 fps (59–60) up to 1000 tokens at ~14 ms js; 2000 tokens -> 32–36 fps, js 27–30 ms -> CPU-bound.
- Phone is ~2.5x slower than laptop on the same JS work.
- **Phone fixed overhead:** js ~3 ms even at 50 tokens vs 0.4 ms on laptop. Hypothesis: overlay / culling per-frame cost. Keep small in the real app.
- **Isolated spikes, not patterns:** phone worst 80 ms at 16384/1000 tokens; laptop worst 32 ms at 4096/50/200 strokes (run B). Likely GC or texture upload one-offs; not reproduced across runs.
- **fps column is vsync-capped at 60.** Use js ms as the headroom metric; fps only drops once js exceeds budget.
Real-VTT risks:
- Update only moved tokens; never all tokens per frame. Chaos at 2000 moves everything and is the worst case.
- If mass movement is ever needed on mobile, switch to `ParticleContainer` (next step, not tested).
- A single 16384 texture is ~1 GB VRAM (16384² × 4 B) on GPUs whose maxTex allows it. Consider capping texture size or forcing tiles, even where the device could take a single texture.
- BitmapText rasterises at one font size: labels blur when zoomed in. The installed glyph set is Latin/digits only; non-Latin names need `Text`/HTMLText or a bigger atlas.
- Per-stroke textures: 200 strokes = 200 GPU textures. Thousands of strokes need atlasing/merging and texture GC planning. Very long strokes are baked at a 4096 px cap and look soft.
- Tokens are one Container + 2 children each: 2000 tokens = 6000 scene nodes touched per frame in chaos mode.
- WebGPU header shows `GPU: ?` (adapter info not read). Cosmetic.
Untested:
- HP churn timing (the Run-benchmark runs churn OFF; toggle is manual).
- iOS / Safari.
- WebGPU on mobile.
- Tablets beyond the Note 10.