Prototype: PixiJS v8 rendering performance for VTT — verdict #1

Closed
opened 2026-11-01 22:11:39 +01:00 by SirStone · 1 comment
Owner

Question: can PixiJS v8 render a VTT-sized scene smoothly on modest hardware? Spec: docs/prototype.md.

Prototype (primary source, throwaway, not for main): branch prototype/pixi-perf, commit b7b4e9e, https://git.fossellini.top/SirStone/FFF_vtt/src/branch/prototype/pixi-perf — dir prototype-pixi-perf/; README holds all benchmark tables.

Tested:

  • Laptop Radeon 780M: WebGL ×2, WebGPU
  • Galaxy Note 10 / Mali-G76: WebGL, Chrome 156 Android
  • Scenario: map 2048–16384 px × tokens 50–2000, chaos on (all tokens move every frame), plus 200 baked strokes

Verdict: YES.

  • Laptop: 60 fps (vsync cap) everywhere.
  • Phone: 60 fps up to 1000 moving tokens; ~32–36 fps at 2000.

Findings:

  • Map size is ~free. Tiling over maxTex verified: phone 4096 limit → 4/16 tiles; laptop WebGPU 8192 → 4 tiles.
  • Baked strokes are free.
  • Only scaling cost is per-frame JS on token updates. Laptop 2000 tokens: ~10–12 ms WebGL / ~9–10 ms WebGPU. Phone: ~27–30 ms, CPU-bound.
  • WebGPU: slightly lower JS and smoother than WebGL.

Decisions to carry into real code:

  • Update only moved tokens, never all per frame.
  • BitmapText for frequently changing labels.
  • Bake finished strokes to texture.
  • Tile maps above renderer maxTex.
  • Enable culling.

Risks / open:

  • Single 16384 texture ≈ 1 GB VRAM where maxTex allows → consider capping/forcing tiles.
  • BitmapText blurs when zoomed in.
  • ~3 ms fixed per-frame overhead on phone (cause unverified).
  • Isolated 80 ms spike on phone at 16384 / 1000 tokens.
  • WebGPU maxTex 8192 likely Pixi default device limits (hypothesis).
  • ParticleContainer if mass movement is ever needed.

Untested: HP churn timing, iOS/Safari, WebGPU on mobile, other tablets.

**Question:** can PixiJS v8 render a VTT-sized scene smoothly on modest hardware? Spec: `docs/prototype.md`. **Prototype** (primary source, throwaway, not for main): branch `prototype/pixi-perf`, commit `b7b4e9e`, https://git.fossellini.top/SirStone/FFF_vtt/src/branch/prototype/pixi-perf — dir `prototype-pixi-perf/`; README holds all benchmark tables. **Tested:** - Laptop Radeon 780M: WebGL ×2, WebGPU - Galaxy Note 10 / Mali-G76: WebGL, Chrome 156 Android - Scenario: map 2048–16384 px × tokens 50–2000, chaos on (all tokens move every frame), plus 200 baked strokes **Verdict: YES.** - Laptop: 60 fps (vsync cap) everywhere. - Phone: 60 fps up to 1000 moving tokens; ~32–36 fps at 2000. **Findings:** - Map size is ~free. Tiling over maxTex verified: phone 4096 limit → 4/16 tiles; laptop WebGPU 8192 → 4 tiles. - Baked strokes are free. - Only scaling cost is per-frame JS on token updates. Laptop 2000 tokens: ~10–12 ms WebGL / ~9–10 ms WebGPU. Phone: ~27–30 ms, CPU-bound. - WebGPU: slightly lower JS and smoother than WebGL. **Decisions to carry into real code:** - Update only moved tokens, never all per frame. - `BitmapText` for frequently changing labels. - Bake finished strokes to texture. - Tile maps above renderer maxTex. - Enable culling. **Risks / open:** - Single 16384 texture ≈ 1 GB VRAM where maxTex allows → consider capping/forcing tiles. - `BitmapText` blurs when zoomed in. - ~3 ms fixed per-frame overhead on phone (cause unverified). - Isolated 80 ms spike on phone at 16384 / 1000 tokens. - WebGPU maxTex 8192 likely Pixi default device limits (hypothesis). - `ParticleContainer` if mass movement is ever needed. **Untested:** HP churn timing, iOS/Safari, WebGPU on mobile, other tablets.
Author
Owner

Verdict recorded and checked in the spec + prototype record.

  • docs/DESIGN.md §7.2 Rendering techniques kept from the perf prototype [MEASURED, prototype-pixi-perf/README.md]: YES — Pixi v8 renders a VTT-sized scene at 60 fps on Radeon 780M (WebGL and WebGPU) and on a Galaxy Note 10 (WebGL) up to 1000 tokens; Note 10 js ~14 ms at 1000 tokens, 2000 tokens -> 32-36 fps (CPU-bound), laptop js 9-12 ms at 2000 tokens. Only per-frame token JS scales; a real table needs tens of tokens.
  • prototype-pixi-perf/README.md §Findings (real hardware) + benchmark (D) Note 10: same verdict, with the numbers behind it (map size ~free: phone maxTex 4096 -> 16 tiles at 16384; 200 baked strokes ~free on real GPUs; fps vsync-capped at 60 so js ms is the headroom metric; ~3 ms fixed phone overhead).
  • Carried into DESIGN §7.1/§7.3/§7.4 as techniques: update only changed entities, BitmapText + pre-installed BitmapFont, shared GraphicsContext + pooled tokens, culling (cullable/fixed cullArea), tile above max texture, never one 16384 single texture (~1 GB VRAM).
  • Risks carried, not resolved: iOS/Safari, WebGPU on mobile, tablets, HP-churn timing.

Nothing further to decide here: the question is answered and the answer is in the spec. Closing.

Verdict recorded and checked in the spec + prototype record. - `docs/DESIGN.md` §7.2 *Rendering techniques kept from the perf prototype* [MEASURED, `prototype-pixi-perf/README.md`]: **YES** — Pixi v8 renders a VTT-sized scene at 60 fps on Radeon 780M (WebGL and WebGPU) and on a Galaxy Note 10 (WebGL) up to 1000 tokens; Note 10 js ~14 ms at 1000 tokens, 2000 tokens -> 32-36 fps (CPU-bound), laptop js 9-12 ms at 2000 tokens. Only per-frame token JS scales; a real table needs tens of tokens. - `prototype-pixi-perf/README.md` §Findings (real hardware) + benchmark (D) Note 10: same verdict, with the numbers behind it (map size ~free: phone maxTex 4096 -> 16 tiles at 16384; 200 baked strokes ~free on real GPUs; fps vsync-capped at 60 so `js ms` is the headroom metric; ~3 ms fixed phone overhead). - Carried into DESIGN §7.1/§7.3/§7.4 as techniques: update only changed entities, `BitmapText` + pre-installed `BitmapFont`, shared `GraphicsContext` + pooled tokens, culling (`cullable`/fixed `cullArea`), tile above max texture, never one 16384 single texture (~1 GB VRAM). - Risks carried, not resolved: iOS/Safari, WebGPU on mobile, tablets, HP-churn timing. Nothing further to decide here: the question is answered and the answer is in the spec. Closing.
Sign in to join this conversation.