The problem: transforming font size dynamically on
30 lines per frame constantly thrashes standard glyph atlases.
The fix: rounding raster sizes to a deterministic
lattice drops atlas cache misses from 154 a frame to zero, shrinking
the atlas footprint from 32,508 entries down to 644.
Verify:
$ cargo run --release --example raster_cost
The problem: upstream GPUI runs a face's bytecode
hinting program per glyph instance (~31 µs each).
The fix: keying the cache directly to (face, size)
builds just 30 instances per frame where an uncached hinting run
would execute 3,480 times.
Verify:
$ cargo run --release --example raster_cost
The problem: rasterizing dense text on every frame
devours CPU cycles.
The fix: outlines are tessellated once (639 µs).
Subsequent frames stream 218,322 pre-computed vertices straight to
the GPU in 48 µs. You trade bus traffic for massive frame savings.
Verify:
$ cargo run --release --example vector_cost