What Fibo is: a native Mac workbench for coding agents such as Claude Code and Codex, open source (MIT), written in Rust with GPUI and libghostty-vt. Sessions are in a sidebar on the left, terminals on the right. Every time an agent prints, the terminal draws a frame, so what one frame costs decides how much CPU the window takes. Install: download the DMG, or brew install --cask majiayu000/tap/fibo.
01 The problem: CPU time is not a ruler
To make "the window must not get slower" a check every PR passes, you first need a ruler that holds still. The obvious one is CPU time: draw 300 frames, take milliseconds per frame. That is how we started, and it soon turned out to follow how busy the machine was. Fibo's development machines often have several agents compiling Rust at once, with load anywhere from single digits to over a hundred.
The same build drawing the same frame took 2.5 times as much CPU time at load 40 as at load 6 (the probe's code comment records 1.1 ms and 2.7 ms for one frame). The cause is ordinary: on a busy machine the process lands on efficiency cores and clocks drop, so the same work takes longer. The number of machine instructions the CPU actually completed, the retired instructions, barely moves. The table puts the repository's records next to a remeasurement:
| What | Conditions | CPU time | Retired instructions | Source |
|---|---|---|---|---|
| One window frame | Load 6 vs load 40 | 2.5x apart (1.1 / 2.7 ms) | Under 1% apart | Performance guide §2; comment in cpu_probe_evidence.rs |
| Opening settings (median of opens 2–6) | Load 45 to 72 | Moves with load | 4.86–5.03 M, does not move | Performance guide §5 |
| Opening settings (first open, cold files) | Same build, several runs | Moves with load | 9–12 M, and moves at high load | Performance guide §5 (so the gate does not set a line on it) |
| The same Python computation (measured Nov 28) | Normal scheduling, load 217 | 1.49–1.68 s | 34.22–34.33 billion | /usr/bin/time -l, 5 runs |
| Same (measured Nov 28) | Background priority via taskpolicy -b, load 94–174 | 4.77–5.71 s (about 3.2–3.8x) | 34.70–34.95 billion (+1.1% to +2.1%) | Same, 3 runs |
| One window frame on a GitHub macOS runner | CI VM, one main CI run on Nov 27 | Terminal frame 0.65 ms, full redraw 7.03 ms | Always 0 | CI log frames-pane: … 0.00 M instructions |
The last row is the second problem: GitHub's macOS runners are virtual machines with no hardware counters, so ri_instructions is always 0. An instruction-count assertion on CI compares as −100% every time, which means it always passes. The gate has to notice that case first and then measure some other way.
02 What we count: retired instructions per frame
On macOS a process can ask proc_pid_rusage how many instructions it has retired so far. Fibo's window has a module compiled only into the probe build that reads it before and after a run of frames and divides the difference by the frame count (simplified):
/// Instructions this process retired: unlike CPU time, the same work
/// counts the same on a busy machine, on an efficiency core or at a lower clock.
fn instructions() -> u64 {
if std::env::var_os("MOORING_PERF_NO_COUNTER").is_some() {
return 0; // take the VM's path on real hardware, to test the fallback
}
let mut info: libc::rusage_info_v4 = unsafe { std::mem::zeroed() };
let ok = unsafe {
libc::proc_pid_rusage(std::process::id() as i32,
libc::RUSAGE_INFO_V4, (&raw mut info).cast())
};
if ok == 0 { info.ri_instructions } else { 0 }
}
// One stage: draw 300 frames, report CPU time and instructions per frame
let (cpu, ins) = (cpu_secs(), instructions());
/* ...draw 300 frames... */
let per_frame = (instructions() - ins) as f64 / 300. / 1e6; // M per frame
What gets measured is fixed too. The probe runs on a generated workspace: 2000 sessions, 8 spaces, 60 terminals each bound to a session, about 45 sidebar rows, close to a long-used real install (scripts/perf-fixture.py; it calls no model and touches no user data). The window stays off screen and each stage draws 300 frames. The two that matter most:
frames-pane: a frame where only a terminal changed. Every frame while an agent prints is one of these.frames-main: a forced full redraw. Each workspace change (about 1.4 a second in real use) redraws the whole sidebar, which costs close to this.
Other stages cover scrolling a line of Chinese (frames-scroll), sidebar motion, the machine rail, the plugins page, settings pages and startup to first frame: 25 numbers in the baseline file crates/fibo-app/perf-baseline.txt.
Two ways to find the big cost
Once the number holds still, finding causes gets simpler too:
- Take a piece out and measure: temporarily stop drawing one part (have the sidebar return nothing, say) and see how far the count drops. "The sidebar is 88% of a terminal frame" and "without the 50 rows under Today, a full redraw goes from 96 M to 16.5 M" were both found this way.
- Bisect commits: when the gate fires, build commit by commit in a separate worktree and run one stage. A few rounds find it. The "sidebar inside a horizontal flex, full redraw 75 → 130 M" case in section 04 was found this way.
Once the view is known, sample shows where: self time in taffy::compute_flexbox_layout or line_wrapper means layout; self time in app functions and SipHash means repeated per-frame computation.
Traps in the measuring itself
| Trap | What it looked like | What we do now |
|---|---|---|
| Test data too fake | The first workspace had no sessions bound to terminals; the sidebar was empty and nothing showed up | Sessions bound to terminals, quota readings in the logs |
| The probe dirties its fixture | Each run opened one more tab; after dozens there were 91, and the terminal frame grew from 7.8 M to 27 M | Old and new builds run alternately on the same state; rebuild the fixture before reporting |
| Terminal frames are bimodal | The same build jumps between about 6.3 M and 7.0 M | The baseline takes the higher one |
| The CI image has Reduce Motion on | Animations were skipped and the gate measured a still picture; it went red 11 times in a row over this | The probe turns it off for every stage |
| A locked screen | No display link, on_next_frame never fires, a real window cannot be measured | The gate uses only the off-screen probe |
03 The gate: instructions on hardware, a ratio on VMs
The gate is scripts/perf-gate.py. On CI it builds its own probe release, runs every stage and compares with the baseline. It first decides whether this machine counts instructions (every stage read more than 0, and MOORING_PERF_NO_COUNTER is not set), then takes one of two paths.
scripts/perf-gate.py. The budgets are two constants: BUDGET = 0.15 and SHARE_BUDGET = 2.0.The VM fallback: a ratio inside one process
With no instruction count and an unsteady clock, let the machine's speed cancel itself out: measure a terminal frame and a full redraw back to back in the same process and take terminal ÷ full. If the machine is busy, both slow down and the ratio barely moves. That ratio is pane-share; the baseline is 0.12, a broken build that redraws the sidebar every frame reads 0.96, and the line is 2x the baseline. One main CI run on Nov 27 read 0.09.
Numerator and denominator have to be measured side by side. Theme frames used to be compared with a terminal frame measured separately at the start, seconds earlier; the VM sped up and slowed down in between, and the same code read theme-share anywhere from 0.73 to 2.37, going red once. Now each theme alternates with the plain look in 10 runs of 30 frames, each adjacent pair gives a ratio, and the gate takes the median.
What timing cannot catch, count
Some bugs are not about how expensive a frame is but about how many frames get drawn, or whether they are right. Those are asserted with counts and pixels, which work on a VM too:
- A catch-up loop: the first check counted all catch-up redraws in 5 seconds. A CI runner with a display draws on its own, so a working build had 9–15 and the check misfired. It now counts the bug's direct sign, "a catch-up's own frame scheduled another catch-up": 0 for a working build, 15 for the broken one (
8678054). - A split-pane focus ring that keeps drawing after it fades: instructions per frame did not change; the number of frames did. After the ring vanished the old build still asked for 120 frames a second, 25.24% of a core in a three-pane test (#461). The gate now requires frame requests while the ring shows and none after it fades, even when a redraw is forced.
- Scrolling a line of Chinese: asserted by the number of runs handed to CoreText. A normal line is 18; the build whose shaping cache missed shaped 774; 0 means nothing scrolled and the gate measured a still picture.
The gate gets tested too
When the gate first went in, we built three broken versions on purpose (the first three rows) and checked each was stopped; every check added later got the same treatment. Changing the gate means doing this again:
| Deliberately broken build | What the gate saw | Result |
|---|---|---|
| Every terminal output notifies the whole workbench | +666% instructions, sidebar redrawn every frame | Stopped |
| Sidebar does not refresh | Pixel differences after filter, unfilter and rename | Stopped |
| Catch-up loop | 15 self-triggered catch-ups | Stopped |
| Plugins page not reused (hardware) | +544% instructions | Stopped |
| Animation card twice as slow (hardware) | +99% instructions | Stopped |
| Plugins page asks for frames at rest | 480 requests at rest | Stopped |
| Page not reused (VM mode) | cardplay-share 1.08, normal 0.17–0.19 | Stopped |
| Card drawn 40 extra times (VM mode) | cardplay-share 0.76 | Stopped |
| Focus ring expiry check moved back after scheduling | 1 extra frame after the fade | Stopped |
Chinese shaping from before f21658e5 (main's build) | frames-scroll 39.44 M, +48.5% | Stopped |
Testing the gate also caught it measuring nothing, twice. The plugins-page gate's first run reported "the old paper theme is not in effect": the probe had set the light theme on the dark side, the theme never changed, and the numbers looked great. Later, CI was all green but the log showed animation cards at 0.00 ms: the probe picked the costliest animation by instructions, all zero on a VM, so it picked none. The local switch that imitates a VM only changed the gate script back then, and the probe still read instructions, so nothing showed locally. Now the switch reaches the probe and the gate asserts the time is above 0. The rule: any measurement that looks very good must assert that the thing measured actually happened.
The baseline only moves down with the code
The 15% line is relative to the baseline. If an optimization lands and the baseline stays, the gate quietly loosens. On Nov 25, frames-main and frames-railrest were 25–27% under their baselines; with a 15% budget they would have had to grow over 40% to fire, so those two checks were effectively off (#568). The fix changed only those two lines, taking the higher of two full gate runs: frames-main 55.35 → 41.32 M. It did not rewrite everything with MOORING_PERF_UPDATE=1, which would have written the other numbers' ±3–8% drift into the baseline. The gate now prints a reminder when a number is 15% under its baseline.
The gate runs on every PR that touches native code; the CI run we looked at took about 10 minutes including the build. It is not a required check for merging: main only requires Workbench Rust checks. That is why rule R7 asks whoever changes rendering to run it on real hardware.
How large projects do it
Before settling on this, we looked at how a few large open-source projects handle performance regressions (surveyed Nov 4 and recorded in §9 of the performance guide; uv's workflow rechecked on Nov 28):
| Project | What it measures | Blocks PRs? |
|---|---|---|
| pandas | asv benchmarks on a dedicated machine for every merged commit, with step detection afterwards | No; its docs say the same code on the same machine can differ noticeably |
| uv | CodSpeed: walltime mode on a dedicated machine, plus simulation mode (simulated execution, independent of load), reported back on the PR | Can |
| Rust compiler (rustc-perf) | Default metric instructions:u; changes around 0.3% show reliably; people review the graphs weekly | Human judgement |
| Zed (where GPUI comes from) | CI only compiles the benchmark crate | No performance gate seen |
What they share: to block a PR you need a metric independent of machine load (instruction counts or simulated execution); wall-clock time can only warn after the fact. Fibo follows that: instructions on real hardware, and with no dedicated CI machine, a same-process ratio on the VM.
04 What sidebar redraws cost
With a steady ruler, the first cut went into the sidebar. The table lists the biggest changes over three weeks, each measured as instructions per frame on the same fixture with old and new builds run alternately (M = million):
| Date | Change | Measured | Before → after | Left | Commit / PR |
|---|---|---|---|---|---|
| Nov 4 | Sidebar becomes a cached view; terminal output no longer lays it out | Terminal output frame | 74.3 → 10.3 M | 14% | b1438ae |
| Nov 4 | Counts for the title bar, tabs and status bar computed once a second | Terminal output frame | 8.3 → 6.3–7.0 M | ~80% | d6dcf46b |
| Nov 4 | No horizontal flex around the column without a machine rail (fixing a regression) | Full redraw | 130 → 75.7 M | 58% | e0661af |
| Nov 4 | Pointing at an animation card redraws only that card | Plugins page, one playing frame | 78.8 → 12.4 M | 16% | fcda810d |
| Nov 16 | One-line session rows lose a column container and get a fixed height | Full redraw | 105 → 57 M | 54% | #365 |
| Nov 16 | Set-aside spaces test the cheap condition first and look up a set | Full redraw (3 set-aside spaces) | 238.6 → 61.5 M | 26% | #365 |
| Nov 17 | Shaping cache found by content, not only by row | Scrolling a line of Chinese | 419 → 52 M | 12% | #398 |
| Nov 19 | Tab strip becomes a cached view too | Terminal output frame | 7.88 → 5.22 M | 66% | #466 |
| Nov 24 | Chinese runs shaped by CoreText once | Scrolling a line of Chinese | 39.41 → 26.54 M | 67% | #569 |
First cut: terminal output should not lay out the sidebar
Before Nov 3, each terminal output frame cost 74.3 M instructions. Taking pieces out showed the sidebar was 88% of it. The cause is GPUI's redraw rule: cx.notify() marks an entity and all its ancestors dirty. The pane's observer called cx.notify(), so every bit of terminal output laid out the whole workbench, sidebar included.
b1438ae wraps the sidebar in a cached view (AnyView::cached): if it is not dirty and its bounds have not changed, the last frame's drawing is reused. Pane changes now notify an empty child view, Tick; the workbench still redraws the title bar and pane titles, the sidebar does not. Other changes the sidebar shows are picked up by a catch-up within a second. Terminal frames went from 74.3 M to 10.3 M, CPU from 4.5 to 0.8 ms. On Nov 19 the tab strip became a cached view the same way, and the terminal-frame baseline went from 6.96 M to today's 4.52 M.
Caching brings a new kind of bug: the sidebar not refreshing when it should. So the same commit added redraw-check, which compares, after each step, a frame drawn without refreshing against one drawn with a forced refresh, pixel for pixel.
The cost is per row, not the number of rows
With terminal frames down, the big remaining cost was the full redraw. A sample of a real window on Nov 16 showed sidebar redraws taking about half the main thread. The first guess was too many rows, so we tried laying out only visible rows: on the fixture, laying out just the first 20 took a full redraw from 91.6 M to 91.3 M, almost nothing. Taking a piece out instead: without the 50 rows under Today, 96 M became 16.5 M, about 1.6 M a row. The cost was in each row.
The reason is the layout engine, taffy: to size a container that grows with its content, it measures what is inside several times, and each level of nesting multiplies that. A one-line session row used to be row → column container → title, space, time. #365 drops that column container for rows with a single line of text and gives them the fixed height ONE_LINE_ROW. Full redraw: 105 M → 57 M (two alternating rounds: 104.7 / 105.5 → 57.0 / 57.2). visual-check.py shots confirmed the pixels did not change.
The same PR made two pure computation cuts. Each set-aside space went through every session on every redraw, testing the most expensive condition first (which space it belongs to, by comparing paths). Ordering the conditions from cheap to expensive, starting with whether the session is open at all (most are not), took a full redraw with 3 set-aside spaces from 237 to 98 M; collecting lost_agents, the sessions cut off by a restart, into a set took it from 98 to 61.5 M. Against main: 238.6 → 61.5 M.
What was rejected is in the commits too: splitting the space label into two elements saved 3%, right-aligning the time under 2%, both below the cutoff; computing the hover tip only on hover saved about 2.5%, but the tip would read the workbench when it pops up and could crash if a render held it at that moment, so not worth it.
Back in a real window: 24.3% → 8.1%
Fixture instructions do not convert into the CPU percentage a user sees, so each round ends with a sample of a real window. One on Nov 17 found the sidebar spending 1.4 s of every 10 s rendering, 1.04 s of it asking whether 33 space folders still existed (stat). The same 33 folders take 28 µs to stat from a terminal and far longer inside the app process. #386 remembers the answer per path for 2 seconds, at the cost of showing a deleted folder up to 2 seconds late.
Together with #365, the menu bar moving to deltas (#376–#378) and the host reusing hashes for unchanged content (#388), a real window with a dozen-odd agents running went from 24.3% to 8.1% CPU across the update; per 10 seconds, full-window drawing went from 2647 to 338 ms and sidebar rendering from 1395 to 126 ms. It was a single before/after, with running sessions going from 16 to 19, so treat it as rough.
Two regressions per-frame instructions did not catch
On Nov 19 the window felt slow again. The baseline and the script had not changed. One cause was the split-pane focus ring: it scheduled the next frame before checking whether it had faded, so after fading it still asked for about 120 frames a second. Each frame was cheap; there were just endless frames. #461 checks first, then schedules, and adds a gate check that nothing is requested after the fade. Per-frame instructions only say what a frame costs; how many frames get drawn has to be counted separately.
The other was scrolling. In a real window sample, terminal shaping (shape_cell) took about 5% of the main thread (433 of 8980 samples), mostly creating new CoreText layouts. The shaping cache was keyed by row and run position, so any scroll missed everything; each Chinese character is its own run, so each line an agent printed in Chinese reshaped the screen. #398 falls back to finding a run by content (text, cell width, colour, bold and italic) in the previous frame: 419 M → 52 M per line, runs handed to CoreText 774 → 18. On Nov 24, #569 found each Chinese run was shaped twice (once at the terminal size, then again at a computed scale), although a font's glyphs do not change with size and the second pass only multiplies numbers. Shaping once and scaling while drawing took frames-scroll from 39.41 to 26.54 M (−33%); the 13 terminal rendering fixtures plus a new CJK one produced byte-identical PNGs.
05 Ten rules that came out of it
Each fix ends as a rule in §4 of the performance guide, which you read before changing the UI. They are numbered in the order they were added; R8 came before R9:
| Rule | In one sentence | From |
|---|---|---|
| R1 | Pane changes do not notify the workbench; use adopt_pane / pane_changed | Terminal frame 7x (b1438ae) |
| R2 | State the sidebar shows must notify the workbench when it changes, or it is up to a second late | A cached view that missed refreshes |
| R3 | The frame a catch-up triggered must set asked, or catch-ups schedule catch-ups | Broken build: 15 in 5 s |
| R4 | Values every frame needs are not derived by scanning all sessions in render; cache by revision plus current second | frame_facts, quotas, tab names |
| R5 | Do not put big lists inside a horizontal flex; it measures the whole list again | Full redraw 75 → 130 M (348d005) |
| R6 | Per-frame lookups by id use FxHash | SipHash was about a tenth of a terminal frame |
| R7 | Changed rendering: run the gate on real hardware; change the baseline only there, on purpose, with the reason | A VM cannot write the baseline |
| R8 | For a small part that animates, draw it in its own small view and keep the page cached | Animation card 79 → 12 M |
| R9 | Elements on every row avoid content-sized containers; if a height is known, fix it | Full redraw 105 → 57 M |
| R10 | Filters over all sessions test cheap conditions first; tables looked up in a loop become sets first | 238 → 61 M |
Without Fibo, in your own project: on macOS the built-in /usr/bin/time -l prints retired instructions, nothing to install (run on macOS on Nov 28):
/usr/bin/time -l ./your-bench 2>&1 | grep 'instructions retired'
# 34227777414 instructions retired
# The same work on efficiency cores: CPU time grows several times, instructions barely move
taskpolicy -b /usr/bin/time -l ./your-bench
# Counters over time: record with Instruments' CPU Counters template
xcrun xctrace record --template 'CPU Counters' \
--output run.trace --launch -- ./your-bench
Inside your program, read ri_instructions with proc_pid_rusage(pid, RUSAGE_INFO_V4, …) as above, before and after, and subtract. Three things matter more than the tool: treat a reading of 0 as "cannot measure", not a pass; on GitHub's macOS runners it is 0, so have a fallback such as a same-process ratio; and for every check you add, build a broken version first and make sure it goes red. On Linux the matching counter is perf's instructions:u (rustc-perf's default metric); we did not run it on Linux for this post.
06 Measured on Nov 28
For this post we ran the full gate 6 times on an Apple Silicon Mac (Nov 28, 01:39–02:00, with other agents compiling; 1-minute load 30–151). Two builds took turns: new is that day's main (441231a2), old is the merge that wrote today's frames-scroll baseline (34ca0380, #569). Both were built with cargo build --release -p fibo-host -p fibo-app --features fibo-app/visual-test and run with python3 scripts/perf-gate.py target/release.
| Build · run | Load at start | Terminal frame | Full redraw | Scroll a Chinese line | First open of plugins | Gate |
|---|---|---|---|---|---|---|
| Baseline (written on another Mac) | — | 4.52 M | 41.32 M | 26.55 M | 268.97 M | — |
| New · 1 | 90 | 4.10 M | 39.71 M | 31.75 M (+19.6%) | 356.76 M (+32.6%) | Red |
| New · 2 | 75 | 4.24 M | 39.52 M | 31.44 M (+18.4%) | 339.95 M (+26.4%) | Red |
| Old · 1 | 151 | 4.08 M | 40.11 M | 30.33 M (+14.2%) | 341.12 M (+26.8%) | Red |
| New · 3 | 58 | 4.13 M | 39.61 M | 31.07 M (+17.0%) | 343.71 M (+27.8%) | Red |
| Old · 2 | 30 | 4.10 M | 40.08 M | 30.34 M (+14.3%) | 338.48 M (+25.8%) | Red |
| New · imitating a VM | 37 | 0 | 0 | 0 | 0 | Ratios only; all ratios pass |
The table shows instructions per frame (or per open), with the change against the baseline in brackets. CPU time over the same runs: terminal frames 0.35–0.42 ms, full redraws 2.86–3.17 ms; pane-share read 0.11–0.14 in all six runs, against a baseline of 0.12. Four things come out of it:
- On one machine, instructions hold still: the new build's three full redraws read 39.52–39.71 M (0.5% apart), the old build's two 40.08 / 40.11 M. CPU time did not spread 2.5x this time (2.86–3.17 ms); the load average does not say which cores the process got, so whether CPU time holds still is luck. Instructions do not need luck.
- Instructions do not compare across machines: the very code that wrote the 26.55 M baseline reads 30.33 M here, 14% higher; the first open of the plugins page is 26% higher. Both are mostly CoreText shaping and glyph rasterization inside the system, whose instruction count changes with OS version and hardware. Terminal frames and full redraws are mostly Fibo's own code and read 3–10% lower. A baseline means something only on the same kind of machine, so "red" here is not by itself a regression.
- The real change between old and new is small: on the same machine, alternating, scrolling a line went from 30.33 / 30.34 M to 31.07–31.75 M, a median 3.6% up, inside the 15% line; the other 21 numbers moved within ±2.1% at the median.
- VM mode sees none of it: with
MOORING_PERF_NO_COUNTER=1every count reads 0 and the gate checks ratios only:pane-share0.12 andtheme-share1.06, both inside their lines. None of the +14% to +33% above would be reported on that path.
One more thing we saw and did not chase: in 2 of the new build's 4 runs (including the VM-mode one), the probe stopped on the 设置 › 插件 page asserting that the cached panel differed from a full refresh; the old build's 2 runs did not. Pixel checks fire on a VM too, so this is either a new intermittent bug or this machine's timing under heavy load; it needs its own reproduction.
Limits: what we have not measured
- The VM gap: CI has only the ratio checks, with a 2x line; a normal
cardplay-shareis 0.17–0.19 in the guide's records (0.23 in the Nov 27 CI run). A slowdown under 2x passes there. Only the 15% instruction line on real hardware catches it, which depends on R7. - The baseline belongs to the kind of machine that wrote it: today's baseline was written on another Mac. On Nov 28, on this one, the same code read 14% higher for scrolling a Chinese line and 26% higher for the first open of the plugins page, mostly differences in the system's text libraries. On a new development machine, rewrite the baseline from the same code first, then use the 15% line to judge regressions.
- The gate is not required: merging only requires
Workbench Rust checks. A red gate does not block a merge; someone has to look. - The first time settings open: cold files make the same build read 9–12 M, too noisy for a line. A slowdown only in the first open (measured once at 4 M more) does not fire; only the log shows it.
- GPU and compositor cost: instructions count CPU only. How much GPU WindowServer spends on picture and see-through themes was tried once on Nov 5 with other sessions opening windows; no conclusion.
- Day-to-day CPU of a real window: since the batch of optimizations merged after Nov 20, there is no clean before/after of the installed app under daily load; samples kept hitting a locked screen, a build or a fresh restart.
- The host:
fibo serveis held to at most 1 M instructions per log line, but that check has never been tested with a broken build. - macOS only: the gate runs on macOS; the Windows window has no equivalent gate yet.
Summary: three practices
- Change the ruler first: the same frame's CPU time moves 2.5x with load, its retired instructions under 1%. The gate holds instructions to 15%, falls back to a same-process ratio (2x) on VMs that count none, and treats a 0 reading as "cannot measure".
- Then take the cost apart: taking pieces out found the sidebar at 88% of a terminal frame and about 1.6 M per row; cached views and one fewer container took a terminal frame from 74.3 M to 4.52 M and a full redraw from 105 M on Nov 16 to 41.32 M (4.52 M and 41.32 M are today's baselines).
- Test the gate too: build a broken version for each check (+666%, +544% and +48.5% were all stopped), assert frames, pixels and CoreText runs by count, and lower the baseline after an optimization so the 15% line does not quietly become 40%.