perf(ios): skip the readiness preflight for foreground probe reads

Merged
TH
2d ago
+305-17

Summary

Skip the uptime preflight for each foreground-probe appState read when the ready runner matches the pinned session ID. The two parallel reads keep their one-second deadlines, connection wait, read-only resend, and queued charge rules. A replacement runner receives neither read. Ordinary reads keep their preflight.

Before / after

Warm Settings snapshot -i --debug on Limrun iOS, 30 timed calls per checkout. The base and earlier skip measurements came from the original comparison. The current head used a fresh simulator lease.

Per snapshotBase 12fe72efecEarlier skip 58b647f4c8Current head 90f369471f
Foreground appState sends222
Foreground uptime preflights200
Median wall time591.0 ms468.7 ms463.4 ms
p90 wall time597.5 ms503.6 ms499.3 ms

Validation

At 90f369471ffc479035209ac8a8c8ebb50f5b561d, all 944 tests passed across the two foreground-probe test files and eager-closure-budgets.test.ts. After two warmups, the proof snapshot and all 30 timed snapshots each recorded two skipped preflights with reason foreground_probe_read and two matching sends. The lease was released, the isolated daemon stopped, and Limrun reported zero active instances. CI checks and review pending. Debug trace