perf(ios-runner): prepare an iPhone coordinate tap without re-reading its window
Merged
IM
4d ago+352+352+012345678901234567890123456789-70-70-01234567890123456789
Summary
Before each iOS coordinate tap (what press @ref and press <selector> send), the runner queried the app's windows, re-read that window's frame and screen at dispatch, and ran one SpringBoard modal query per type. On an iPhone with one screen the app fills it, the rule the sole-screen route already uses.
- Such a tap takes the screen in the app's orientation as its frame. The windows query runs only when synthesis fails, so the XCTest fallback keeps its proof.
- A gesture whose window fills that screen routes its record to the screen. Placed windows, iPads and multi-screen devices keep the window route. One
SynthesizedWindowSourcevalue decides both. - One SpringBoard query matches alerts and sheets; alerts still win.
Before / after (iOS 27.2 simulator, Settings)
Builds taking turns, 24 presses of each kind per build, daemon-side medians, load 8–27:
| Step | Base | Head | Delta [95% CI] |
|---|---|---|---|
press @ref | 444 ms | 318 ms | −125 ms [−144, −114] |
press 'label="General"' | 501 ms | 384 ms | −118 ms [−128, −104] |
wait text after it | 98 ms | 104 ms | within noise |
press, wait, back, wait | 1725 ms | 1610 ms | −115 ms [−164, −87] |
Under heavy load: −179 to −199 ms per press.
Validation
- Base
d2a4abe701; headf336513ece. A recorded simulator run at this head (review reply) covers scroll, swipe,backand edge touch in both orientations, and apressunder a SpringBoard alert. - Runner unit tests pass (7 new); 6 mutants each fail a test.
- Gate:
native-dupes,xctest-selection,packaged-runner-swiftpassed.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.