BlogBenchmarksResearchturno-browser

Measuring a 500 ms wait with paired runs

Lowering the wait after each browser action from Playwright's 500 ms to 100 ms cut the median paired wall time of nine scripted tasks by 36%, with the same calls. Running the two settings in alternating pairs is what made that readable on a busy laptop, and what showed the two tasks where the change could not be told apart from noise.

7 min read

View sourceFeed
Measured
MethodApple M3, 16 GB, macOS, Node 26.13, Chrome 157 headless, turno-browser 0.3.0

turno-browser 0.3.0 added a settle key to identity.json: the wait after each action, which is Playwright's 500 ms by default. To see what lowering it does, the repository's evaluation suite ran nine browser tasks five times with the default and five times with "settle": "100ms", on 2026-11-19 (UTC).

Across the nine tasks, the median paired difference was -9.9 s (-36%), with a 95% interval of -11.8 to -4.4 s. Every run of both configurations succeeded, with the same tool calls. For two tasks, slow and find, the suite could not tell the change apart from noise.

The machine was busy with other work during the run, as the benchmarks page records. This post is about how the suite still got a usable number out of it.

What a run is

Each task is a fixed script of tool calls on local fixture pages: fill a sign-up form, approve a popup, click a button a cookie banner covers, wait for a slow page, read values from ten tabs, type into a field two shadow roots deep, work in iframes, answer a confirm() dialog, find one price in a 400-row catalog. The script is not a model, so both configurations get exactly the same calls, and a difference in time comes from the server.

Success is read from what the fixture site received, since each page posts what the user did, never from what the script believes. Every run gets its own server, Chrome and fixture site, and the clock starts after Chrome has.

Pairs, and an order that alternates

With --b, every task runs in both configurations, back to back:

Shell
pnpm bench:browser --b settle-100 --rounds 5

Today the command runs the build of the checkout and ten tasks; the numbers here come from the suite at commit 6c56e3f with turno-browser 0.3.0.

The configuration that goes first changes from one round to the next:

bench/browser/lib/stats.mjsJavaScript
export function schedule(tasks, configs, rounds) {
  const out = [];
  for (let round = 0; round < rounds; round++) {
    const order = round % 2 === 0 ? configs : [...configs].reverse(); 
    for (const task of tasks) for (const config of order) out.push({ round, task, config });
  }
  return out;
}

A warm disk cache, a slow first start or a laptop that heats up then weighs on both sides. Each run is compared with its pair from the same round, not with a pool of runs from the other side.

What the pairs showed

TaskDefaultsettle-100Difference95% intervalPairs lower
form1,354 ms542 ms-59%-1,012 to -699 ms5 of 5
popup876 ms411 ms-46%-588 to -247 ms5 of 5
overlay6,837 ms5,545 ms-18%-1,479 to -1,132 ms5 of 5
slow3,789 ms3,106 ms-13%-940 to +3,013 ms4 of 5
tabs9,549 ms6,518 ms-31%-5,847 to -1,938 ms5 of 5
shadow1,205 ms329 ms-73%-1,046 to -728 ms5 of 5
frames2,357 ms680 ms-67%-2,357 to -1,329 ms5 of 5
dialog1,223 ms450 ms-67%-897 to -599 ms5 of 5
find182 ms208 ms+17%-135 to +135 ms1 of 5
all nine27,305 ms19,057 ms-36%-11.8 to -4.4 s5 of 5

The times are medians of five runs. The difference is the median of the paired differences, relative to the default's median. For all nine, the medians alone differ by 30%.

The saving is largest where a task is mostly actions: shadow, frames and dialog lost two thirds of their time or more.

Peak memory was 935 to 1,123 MiB at the median outside tabs in both configurations, and 1,633 and 1,729 MiB in tabs, with ten tabs open. In form, dialog and find it was higher with settle-100 in all five pairs, by a median of 23 to 64 MiB; for the other six tasks the interval crosses zero.

The form task, five runs each

milliseconds · lower is better

The form task, five runs each, in milliseconds, lower is better
ResultMillisecondsVs. baselineMinMax
settle-100"settle": "100ms"5422.5x less442573
defaultPlaywright's 500 ms1,354baseline1,2411,454

Five runs per configuration in pairs that alternate which goes first, with the median wall time as the bar and the fastest and slowest run as the whisker.

Env
Apple M3, 16 GB, macOS, Node 26.13, Chrome 157 headless, turno-browser 0.3.0
Runs
median of 5
Measured
Reproduce
Filling and submitting a sign-up form. The slowest run with the shorter wait is still faster than the fastest with the default.

tabs shows why the pairs matter. The default's five runs ranged from 7,449 to 13,999 ms and settle-100's from 3,674 to 11,064 ms, so the two sets overlap. Pair by pair, settle-100 was faster every time, by 1,938 to 5,847 ms. The slowest run of each configuration came from the same round, the fifth (13,999 and 11,064 ms).

Where the suite could not tell

slow waits for a slow page and its late data. Four of five pairs were faster with the shorter wait, by 483 to 940 ms. The fifth was slower by 3,013 ms: in that settle-100 run the first browser_wait_for took 4,805 ms, against 1,488 to 1,936 ms in the other nine runs. One slow run is enough to put the interval across zero, which is how the suite says it cannot tell.

The slow task, five runs each

milliseconds

The slow task, five runs each, in milliseconds
ResultMillisecondsMinMax
settle-100"settle": "100ms"3,1062,9466,790
defaultPlaywright's 500 ms3,7893,6093,886

Five runs per configuration in pairs that alternate which goes first, with the median wall time as the bar and the fastest and slowest run as the whisker.

Env
Apple M3, 16 GB, macOS, Node 26.13, Chrome 157 headless, turno-browser 0.3.0
Runs
median of 5
Measured
Reproduce
The median moved, but one run with the shorter wait took 6,790 ms, 4,805 ms of it in one browser_wait_for.

find has no click and no typing: a navigation and one browser_find. It took 182 ms at the median against 208 ms, and the paired differences ran from -135 to +135 ms. In a task that takes a fifth of a second, the suite cannot tell +17% apart from noise.

Five pairs and a bootstrap

The interval is a 95% percentile bootstrap of the median of the paired differences: resample the differences with replacement 2,000 times, take the median of each sample, keep the middle 95%.

bench/browser/lib/stats.mjsJavaScript
export function bootstrapMedian(diffs, { resamples = 2000, seed = 1 } = {}) {
  const d = diffs.filter((x) => Number.isFinite(x));
  if (d.length < 5) return undefined; 
  const rand = seeded(seed);
  const medians = [];
  for (let i = 0; i < resamples; i++) {
    const sample = d.map(() => d[Math.floor(rand() * d.length)]);
    medians.push(median(sample));
  }
  medians.sort((a, b) => a - b);
  return [medians[Math.floor(resamples * 0.025)], medians[Math.ceil(resamples * 0.975) - 1]];
}

The generator is seeded, so a report can be recomputed exactly from its raw runs. With fewer than five pairs there is no interval, and the suite ends its table with "Use --rounds 5 or more before trusting a difference."

The median of five values is always one of them, so with five pairs both ends of the interval are differences that were actually measured.

That is enough for the question the suite asks: does a change break a task, add calls, or cost time, tokens or memory.

A finding on the side

In overlay, the first click hits a button a cookie banner covers. In all ten runs that click took between 5,031 and 5,087 ms, with either setting: it waited out Playwright's action timeout before turno said which element covered the button. The next release, 0.4.0, names the covering element when it still covers the target 300 ms after the call, instead of after the 5 second timeout.

What this does not measure

The tasks are scripted, so the suite measures the server's part of a task, not how a model decides. It ran once, on one machine. The tokens matched in every run but one: a tabs run of settle-100 returned 6,820 tokens against 6,727 in the other nine, and the report does not say why.

Since 0.11.0 the wait after a click, key press or typed text ends as soon as the page is done with it. Its limit is the longest Playwright's wait can be: settle when the action started no request; with requests, settle, up to 5 s for them and settle again; after a navigation, settle, up to 10 s and settle again, one settle longer than Playwright. Read mode and one other engine keep the fixed wait. The numbers above describe 0.3.0, where the wait was fixed.

Sources

Measured on an Apple M3 with 16 GB, macOS, Node 26.13 and headless Chrome 157, with turno-browser 0.3.0, from 04:25 to 04:34 UTC on 2026-11-19. The raw runs, in a file named 2026-11-18, keep every call of every run and the paired summary, and the suite came with pull request 93.