v1.0.13 · Release snapshot

Documentation comes from this release commit, without inheriting newer content. Commit: 371ee4692c.

TileFalling: 60 fps but not smooth (2026-11)

Symptom: the falling tiles report 60 fps yet look uneven, as if the transform reaches the sprite engine a frame late.

Measured off-device (bun / JSC — only the ratios mean anything)

SuspectResult
Lane tick breathing (audio discipline, ±10 % max, τ = 100 ms), simulated with the real tick-driver / gameplay-clock functions, 800 px/s, busy JSstep vs constant speed: p95 ≤ 0.18 px, max 0.33 px at 60 Hz; rate within ±2.4 %. Not the cause.
writeTileQuads remap on a revision change (pool 64–256, 24–120 live)2–3 µs (JSC); even at 30× (Hermes) ≈ 0.1 ms. Not the cause.
Pool-style per-frame rewrite (useSpriteSystem equivalent)1–3.7 µs every frame, versus ~0.05 µs for the scroll-uniform path used today: moving to useSpriteSystem is a code-shape choice, not a speed-up.

Measured on a device (dev build, 60 Hz, two 44 s songs, 150 px/s lane)

A temporary UI-runtime probe (removed again) recorded per 2 s window, from the second after the countdown on:

WhatResult
UI frame cadence120 frames / 2 s, longest 16.67 ms; no frame over 1.5 × the shortest
Tick mapper vs the TileFalling frame callbacksame frame every time (0 double runs, 0 frames without a mapper), ~0.1 ms after the callback
Surface image reaching its consumer mappersame frame in every window (imgLate = 0) — the useSurfaceMapper ordering fix works
Lane speed as seen per frame150 px/s, sd ≈ 1 px/s (0.6 %, < 0.05 px per frame)
surface.render() / whole presentmean 0.2 ms, max 1.4 ms
GPU: submit → onSubmittedWorkDonemean 16.5 ms, max ≈ 18 ms in every steady window. This is quantised to the next queue pump (one frame), so it only says the pass is done within a frame — never two; it is not the GPU time

Only hitches seen: a few UI frames of 27–70 ms in the first ~5 s of a song (prewarm, countdown end, first notes), and a rare one later (33 ms, 95 ms with a 55 ms JS stall). Tile present cost never exceeded 1.4 ms, so those hitches are not the tile path.

Conclusion: everything up to the GPU completing the tile pass is smooth and in step with the rest of the frame. A remaining lag cannot come from the tick, the mapper order, the writer or the tile render. What is left is outside what the UI runtime can see: the Skia record → display-link present tail (the same one frame for every Skia-drawn thing), and the display.

If it comes back

  • Screen-record the device at 60 fps and diff the tile Y per frame: the only way to see what is actually presented.
  • Try a release / profile build before anything else; the numbers above are a dev build.
  • Xcode Metal System Trace for the present tail, as in game-mode-thermal-2026-10.md.
  • The start-of-song hitches (first ~5 s) are a separate, measurable item: hitch trace (EXPO_PUBLIC_HITCH_TRACE=1, Lab → Hitch traces) already marks the countdown and prewarm windows around them.

Update — tiles moved onto useSpriteSystem (2026-11-03)

The measurements above are for the surface + mapper design. The lane is now two sprite systems on the shared FX frame (see piano.md, Frame order): every awake tile is rewritten each frame, with no scroll uniform and no mapper (since 2026-11-03 evening: from its own position + velocity, not from the tick). Two things to re-measure on a device:

  • Tick freshness. Superseded: tiles no longer place themselves from tickSv each frame. Each bound slot carries headY / tailY and velocity and advances by v · dt of the FX frame itself; the engine publishes the lane rate and an epoch (see piano.md, Frame order), and the tick is only used to anchor (bind, tap, epoch change) and to slide the cursor, with one frame of rate · dt added when the read is stale. If a lag remains, log fresh, rate and the anchor error headY − closedForm(tick) on a device before suspecting anything else.
  • Per-frame rewrite cost. The off-device number above (1–3.7 µs per frame for the whole pool) predicted this to be a code-shape choice rather than a cost; confirm with a dev-build probe.