Making a browser-automation CLI faster — five candidate optimizations, measured under accounting rules that stop a change looking faster by quietly doing less.
The command on your PATH is not the tool. It is a 41-line Node script that resolves a platform package and execs the real binary, so every invocation is two process spawns and the first is a runtime boot — paid before any browser work begins.
Two real journeys: flat (6 commands, a practice shop) and navheavy (7 commands, saucedemo). Positive is faster. The bar is scaled to the largest magnitude measured — the 740ms loss.
| # | Technique | Verdict | flat | navheavy | relative to zero |
|---|---|---|---|---|---|
| T1 | Call the native binary, not the shimnot an optimization — a packaging defect | Ship it | +405 | +691 | |
| T3 | Direct-attach BiDi socketgives up the actionability checks | Narrow case | +80 | +45 | |
| T5 | Flat post-navigate waityou cannot ask “ready yet?” without queueing | No effect | — | — | |
| T4 | JS-dispatch click and fillfaster because it stops checking elements are actionable | Not an optimization | +253 | +665 | |
| T2 | One persistent processa subscription it never releases, and it accumulates | Loses | −740 | −212 |
Both are built from the evidence base and measured to fit the paper they declare. Open in Chrome, then Print → Save as PDF.
The full argument: five verdicts, the per-call tax by position, the patch, and the honesty rules the study was run under. Built to the official PNSQC template's own section order and trim.
Open the board → paper A0 · margins None · background graphics ONThe pointers rather than the charts — the verdict table with its evidence column, who the upstream fix does not help, and where to reproduce the headline number yourself.
Open the handout → paper Letter · margins Default · background graphics ONAn animated loop for the laptop beside the board: the wrapper-vs-binary race, the two-spawn path, the five verdicts, the sweeps, the six rules, and the repro QR. Self-contained, runs offline.
Open the loop → F full screen · ← → scenes · Space pauseThe board will not build if it disagrees with the evidence base. The evidence base is then checked three ways that are not the same thing.
Every pointer opens — file, line range, commit. Cheap, and proves nothing about content.
The cited line still contains the figure claimed. This is the one that catches a figure broken by a later edit somewhere else.
The arithmetic the prose rests on: 118 − 10 = 108, a stated loss is negative in the data, the sweep's spread matches its runs.
Both artifacts are measured against the paper they declare. Validated by planting violations and watching them fail.