All work

Spine Benchmark

Measure what a Spine skeleton costs, on real phones

A browser workbench, CLI, live in-game profiler and embeddable viewer for Spine 4.2 on PixiJS v8. Since v4 it measures instead of guessing, and every per-device estimate comes with its error band.

Open the workbench Source
  • Cost in milliseconds on real phones

    Estimates come from regressions fitted on ten real devices and are shown with their error, so a review discusses a phone, not a score.

  • Replaced a score that did not work

    The old weighted score explained 2% of measured frame time. v4 measures instead and says what it cannot measure.

  • Same numbers everywhere

    The workbench, the CLI and the in-game profiler share one formula, so an animator and a developer see the same cost.

What it does

Drop a skeleton into spine.schmooky.dev and you get three things:

  1. The skeleton's own CPU cost per frame, measured and separated from the workbench's own overhead.
  2. Exact work counters: draw calls, vertices, state changes, batch breaks, stencil and render-target switches.
  3. An estimated cost in milliseconds on each benchmarked phone, always shown with its error band.

Around the workbench sit a headless CLI (spine-benchmark analyze hero.skel hero.atlas --format=json), pixi-crawler (a live profiler you embed in a running game), Spinefolio (an embeddable Spine viewer for docs and blogs) and Spine Watcher, a small Tauri desktop app that watches .spine files while an animator works.

v4: my scoring model had R² = 0.02

Versions 1–3 gave every skeleton a hand-weighted impact score. It looked authoritative, and I wrote a seven-part series explaining it. Then I measured. Against real per-device timings, the weighted score explained almost nothing: R² = 0.02.

So v4 (PR #60) threw it away:

  • Measure, don't predict. Counters are exact; time is measured on the device you're on.
  • Calibrate per device, not per spec sheet. Ten phones ran the same scenes. Two with similar CPUs (Dimensity 9000 vs Tensor G2) measured 8.6 ms vs 4.2 ms on the same work. Phones differ in their mix of costs, so each one gets its own regression over vertices, deformed meshes, weighted meshes, covered pixels and draw calls.
  • Show the error. Seven devices pass the trust ceiling (30%) with held-out error between 19.2% and 26.5%. The UI prints it next to every estimate.
  • Say what you can't measure. Browsers don't expose GPU time (Chrome hides EXT_disjoint_timer_query on Android and macOS). I tried a fill-rate model; its implied rate swung 50× on a single device, so it's gone.

The rewrite was +25k / −106k lines across 464 files and took the published packages from 20 to 6. A lint guard (check-no-duplicate-impact-formulas) keeps the offline CLI and the live profiler on one formula, so they can never disagree.

Workbench

React 19 with Animations, Bones, Draw Calls, Events, Info, Library, Mesh and Mixer panels, a device meter, drag-and-drop loading and a guided tour. Spine 4.2 only. For mixed 4.1/4.2/4.3 runtimes, see pixi-marrow.

History

Date
2024-09First commit
2026-04-11Encrypted share reports, 4× faster CI, nightly snapshots
2026-04-12Spine Watcher desktop app (Tauri v2)
2026-04-15v3.2: 18 npm packages released
2026-07-03ADR 0004: drop the impact-score package stack
2026-07-28v4: measured workbench, 10-device calibration
2026-09-28Metrics packages and standalone pixi-crawler on npm