Lokyr
Documentation

The latency's tail of 0.4.0: a first session

On this page

Measured on 2026-11-04, between 14:50 and 14:58: whether the windows' accessibility trees, new in 0.4.0, lengthen the latency's tail that 0.4.0's A/B found, 0.4.0's p99 higher than 0.3.0's in 7 rounds of 8. The reports are in latency-F3-135, with the session's script, run.sh, its analysis, analyze.py, and the patches of the two variants, b.patch and c.patch, over 0.4.0's commit, 288822f. The work was put off the same day: a second session, in the regime of 0.4.0's A/B, is left to do.

Method

The probe

An accessibility client asked for the window's tree as it opened, as the apps of the Accessibility permission on this Mac do when a window becomes key; then the app gave the tree 45 times in the 10 s of the run, once every 200 ms at most as the screen changed at each key. Each tree took 0.38 ms to build, of the pane's text, at the median, and 0.50 ms with the adapter's update, 0.66 ms at most, on the main thread. What the client asks after each tree's notifications is answered on the main thread too, outside that time.

Results

Bundlep50, mean of 6p99, mean of 6Its rangeSamples in the third refresh or laterIn the fourth or later
a, 0.4.026.3 ms70.9 ms66.1 to 76.3 ms271 of 119287
b, 0.4.0 without the trees' rebuilds26.6 ms71.3 ms66.9 to 76.9 ms289 of 119298
o, 0.3.026.3 ms71.4 ms66.1 to 76.3 ms269 of 119173

Left to do

The same session in the regime of 0.4.0's A/B, a p50 near 19 ms: started once a short run of 0.3.0 gives a p50 under 21 ms, with nothing else drawing on the display; and, if 0.4.0's tail is longer there, bundles of 0.4.0 that differ by its other parts on the way of a key to its frame, beside the trees, as the windows' surfaces and layers.

The second session, in the faster regime

Measured on 2026-11-04, between 21:13 and 21:17, of the script and the analysis in latency-F3-135/second, run.sh and analyze.py, with their reports: whether 0.4.0's longer tail shows in the regime of the rounds of 0.4.0's A/B, a p50 near 19 ms, where the first session ran a refresh slower.

Method

Results

Bundlep50, mean of 6p99, mean of 6Its rangeSamples in the third refresh or laterIn the fourth or later
o, 0.3.019.7 ms41.5 ms37.1 to 43.0 ms36 of 11942
a, 0.4.020.0 ms42.6 ms38.2 to 52.8 ms48 of 11944
h, the head19.8 ms46.0 ms42.0 to 50.9 ms45 of 11946

The p99's difference from 0.3.0's, round by round: a −3.7, +4.8, −1.7, −1.6, +10.2, −1.2 ms; h +0.1, +13.8, +5.3, +0.2, +5.6, +2.5 ms. By the place in the round, of every bundle, the p99's mean is 44.9, 43.3 and 41.9 ms, first to third, the p50's 19.8 ms each.

The third session, of the parts of the work since 0.4.0

Measured on 2026-11-04, between 21:51 and 21:59, of the scripts and the analysis in latency-F3-135/third, build.sh, run.sh and analyze.py, with their reports: which part of the work since 0.4.0 lengthens the head's tail that the second session found.

Method

Results

Bundlep50, mean of 6p99, mean of 6Its rangeSamples in the third refresh or laterIn the fourth or later
o, 0.3.020.3 ms45.0 ms39.4 to 52.2 ms45 of 11944
a, 0.4.020.2 ms48.4 ms41.4 to 57.1 ms54 of 119410
m2, the slots20.1 ms45.8 ms41.8 to 53.1 ms45 of 11946
m3, the resize's pace and the placement20.3 ms46.1 ms40.2 to 53.7 ms61 of 11946
h, the head20.5 ms45.1 ms37.1 to 58.4 ms60 of 11948
t, the head but for the placement20.1 ms44.1 ms35.4 to 55.8 ms53 of 11936

By the place in the round, of every bundle, the p99's mean is 41.9, 44.2, 47.3, 45.8, 44.6 and 50.7 ms, first to sixth; the p50's 19.9 to 20.5 ms. Round by round, the p99's differences from 0.3.0's run from −12.9 to +14.3 ms.

The outcome

No part of 0.4.0, nor of the work since, lengthens the latency's tail by a measure larger than the method's noise; the differences that 0.4.0's A/B and the second session found came of the bundles' places in their rounds. The A/B measures from now, 0.5.0's first, take balanced designs, each bundle in each place as often, and tell the places' means beside the bundles'.