This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.
GPU surfaces
•
Moving many positioned views with a camera is expensive on macOS. On an
M5 Max, the counter-only scene averaged 4.61 million retired instructions per
display-link step across two runs. Adding 100 stationary, absolutely positioned labels with font-size=9
brought that to 6.35 million. Changing their left each step used 84.43 million.
After subtracting the counter-only scene, each label averaged about
17,000 instructions per step standing still and 798,000 moving.
Moving an already mounted label cost about 781,000 extra instructions. The Apple
host sends an unchanged paragraph before the label’s frame update. AppKit can
also redraw an unclipped layer-backed view when only its origin changes.
For plain columns with width=20 height=20, each averaged about 4,000 instructions
per step standing, 220,000 moving with left and 210,000 moving with translate.
For marks that follow a camera in bulk, draw
them in a GPU surface or let the surface place each canvas child (ChildrenMode::Each).
(macOS 27.0.1, #1762, measurement procedure, LLP 1014 D5.)
•
A GPU board and grid can bind their own tokens with surface=board(color("surface.board"), color("board.dot")). A transparent clear over a token-painted view also works for the board.
•
A record's named fields reach the wrong surface arguments. Records cross
into a GPU surface by position, not by field name. Import the package's
shapes (ModelNode and ModelHotspot for @exact/model-viewer); if you
declare a shorter shape, keep its fields in the package's declaration order.
(Model viewer's record parsing tests, LLP 1133.039 D1.)
•
A model viewer stops a page scrolling over it. A canvas that takes input
owns every touch and wheel in its box. cameraControls=true reserves that
input at mount; disableZoom=true does not return the wheel to the page.
Leave controls unsaid for a passive model, or room beside an interactive
one for scrolling. Changing mode needs another canvas mount, as in the
scrolling fixture.
(Model viewer scrolling drives, LLP 1133.039 D9.)
Is this helpful
Last updated December 1, 2026