Skip to content

0035. 0035 — Render count is not the load bottleneck

Status: accepted 2026-11-10.

The landings fixture (BENCH_CASE=load, ?coreTiles=0) spends far more vello renders on layer bodies than on the screen. The per-reason tally (render_tally, summed into window.__gpuCanvas.tally, printed by the load bench) on a cold load at 1x:

screenrasterbodymaskmattebackdrop
65174255146844

Masks without feather and non-luma mattes can be drawn inside the single Scene as DestIn / DestOut compose layers. Done for both, the tally became body 406, mask 322, matte 0: ~480 fewer renders per load.

Interleaved A/B against origin/dev, 3 runs, every bench under the shared bench lock. Load, ms, three runs each:

dev sharpscene mattes sharpdev allscene mattes all
1x cold3887 4106 41213941 3991 40822794 2796 28762794 2987 2859
1x warm2355 2403 22862163 2294 22602133 1869 17641826 1775 1742
4x cold10983 10698 109869737 10098 107117918 7576 78917550 7643 8253
4x warm7503 7322 83206812 6978 69435957 5992 67685615 5794 5775

Gestures, BENCH_CASE=landings, ?coreTiles=1, CPU 4x: dev pan 48–53 fps, zoom 14–18, drag 22–23; scene mattes, one valid run, pan 52, zoom 13, drag 18. Its other two runs failed with a blank pan frame.

Cutting ~480 renders moves load times by at most ~7% at 4x, inside the run-to-run range, and not at all at 1x or in gestures. Render count is not the bottleneck; this line stops. Only the tally stays, to keep the count visible.

Scene mattes also drew the image cards of one landing darker than the layer path (stencil mattes from display-list.ts), cause not found. Scene masks matched the layer path pixel for pixel but moved no count on this fixture: its masks are feathered or luma.