You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An explicit --udid re-reads the simulator inventory on every command (~256 ms) #4643
A command that names its device with --udid (or --serial) pays about 256 ms on every call, because the daemon re-reads the simulator inventory to resolve the device, even when the session is already bound to that device. snapshot skips this cost; other commands do not. Callers that always pass an explicit device, such as Expo Explore against a local simulator, pay it on every command of a run.
The 256 ms comes from resolveCommandDevice (packages/daemon/src/resources/session-device-resolution.ts) re-reading the inventory.
Required behavior
When an explicit selector matches the device the session is already bound to, resolve it from the session without an inventory read. This is what snapshot effectively gets today; find out why it differs and use one path.
Keep today's refusals: a selector that names a different device than the session's still refuses as it does now, and the device-claim rules stay unchanged.
Re-read the inventory only when the selector does not match the bound device, or when there is no session.
Done when
Per-command timings with and without --udid are within noise of each other for a bound session, measured on a simulator for at least keyboard status, press and appstate, with before/after numbers in the PR.
The tests for selector-mismatch refusals and claims still pass.
The report identifies measurable existing behavior where an explicit --udid/--serial triggers a 256 ms simulator inventory re-read via resolveCommandDevice even when the session already matches the device. It specifies the affected code path, required behavior, and acceptance tests, making it actionable.
Activity
apex-sentinel-staging commentedon Nov 17, 2026
Apex Sentinel · Issue review
Suggested label:
bugThe report identifies measurable existing behavior where an explicit --udid/--serial triggers a 256 ms simulator inventory re-read via resolveCommandDevice even when the session already matches the device. It specifies the affected code path, required behavior, and acceptance tests, making it actionable.
Required sections