Skip to content

perf(renderer): one frame clock and pacer, fewer style writes, decode before a mesh reveals - #1036

Merged
alowpoly merged 21 commits into
mainfrom
perf/ipad-frames-2
Sep 30, 2026
Merged

alowpoly merged 21 commits into
mainfrom
perf/ipad-frames-2

Conversation

@alowpoly

@alowpoly alowpoly commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

iPad stress runs found long frames and wasted style writes.

  • A hidden mesh decodes its images off the main thread before it shows again: Mars's 177 ms reveal frame is gone.
  • A document has one frame clock and one paced budget a frame, shared by every paced owner. The longest busy frame of the Mars run fell from 80 ms to 57 ms.
  • No write sets a value CSS already holds. Invisible opacities are written once, as 0. Keyboard and accessibility state waits for the camera to stop.
  • Every catalogue dot draws as SVG; the box-shadow painter is gone. A camera turn warps the painted dots with one transform, and they repaint exactly at the pause; which dots a zoom draws lands there too.
  • Leaf backgrounds are shares of the box, so a leaf-box step writes only the box and its transform.
  • Galaxy layers (backing, ring sections, dot layers, large volume and image-layer slices) switch on one a frame, their images decoded off the main thread first: Saturn 99 → 57 ms, Jupiter 97 → 53, the Sun 88 → 51, M31 309 → 128 ms longest frame.
  • Orbit trails fade in eight steps instead of sixteen (pixelmatch 0 on the rested Solar System).

Three rest views stay pixel-identical (pixelmatch 0).

Limits: one iPad run per change; write counts vary about 5% between identical runs.

Clean: renderer typecheck and tests, affected site tests, eslint.

@alowpoly alowpoly changed the title perf(renderer): decode before a mesh reveals, and pace seam outset changes perf(renderer): decode before a mesh reveals, pace seam outset changes, and draw every dot as SVG Sep 30, 2026
@alowpoly alowpoly changed the title perf(renderer): decode before a mesh reveals, pace seam outset changes, and draw every dot as SVG perf(renderer): one frame clock and pacer, fewer style writes, decode before a mesh reveals Sep 30, 2026
@alowpoly
alowpoly merged commit c52f47c into main Sep 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant