Lokyr
Documentation

Where the startup's gap goes

Traced on 28 November 2026. ttybench's startup gap, Lokyr's window on screen less its floor app's, was 76.6 ms for 1.6.0's notarized app and 80.9 ms for 1.5.0's in the startup of the releases' notarized DMGs, past its budget of 70 ms. These traces look for where Lokyr spends what the floor app does not. The script, run.sh, the analysis, analyze.py, and its tables are in startup-F5b-110; the traces' exports, some 30 MB each, stay outside the repository.

Method

Launched by its executable, rather than by open, Lokyr reaches the foreground 69.2 ms after the floor app: ttybench's gap of open holds Launch Services' share too.

Results

The main thread's time from dyld's launch to the app in the foreground, ms:

PhaseLokyr, runningLokyr, blockedThe floor, runningThe floor, blocked
To applicationWillFinishLaunching21.042.039.031.0
AppKit's scene19.823.623.317.9
applicationDidFinishLaunching to the foreground70.238.119.615.7
In all111.0103.781.964.6

The phases reach the foreground at 218.0 ms for Lokyr and 148.8 ms for the floor app. The floor app makes its window before applicationWillFinishLaunching, Lokyr in applicationDidFinishLaunching, so that the phases compare in their sums: Lokyr's main thread runs 29 ms more and waits 39 ms more.

What follows

The cuts to try, measured each against 1.6.0 of ttybench's ab/1-start:

  1. The GPU and the font made after AppKit's first call, rather than beside it, so that the window server and the privacy service answer the main thread first: up to some 20 ms of its waits.
  2. The menu bar, the global keys, the themes' list and the watches after the first frame, on the run loop's next turn: some 5 to 8 ms.
  3. The watches started without waiting for their thread.

The cuts, measured: the first moved nothing and was reverted; the second, which also starts the watches after the first window, cut the gap by 10.9 ms.