Skip to content

perf: investigate faster iOS simulator screenshots #916

Description

@thymikee

Context

SimBench compared iOS-simulator agent tools on speed and token cost using agent-device@0.17.6.

Source: https://github.com/rizwankce/SimBench
Results: https://github.com/rizwankce/SimBench/blob/main/RESULTS.md
Agent-device adapter: https://github.com/rizwankce/SimBench/blob/main/harness/adapters/agent-device.sh

In the benchmark, agent-device screenshot <path> --platform ios --udid <udid> had a warm median around 1574ms, while RocketSim reported 117ms and AXe/Mobilewright were roughly 317-350ms on the same simulator/setup.

This is only one external benchmark, but the gap is large enough to justify a focused investigation.

Goal

Reduce screenshot latency for iOS simulator sessions, or document why the current path is expected to be slower.

Investigation Notes

  • Check whether iOS simulator screenshots can use a faster xcrun simctl io <udid> screenshot <path> path when no runner-specific capture behavior is required.
  • Compare the current screenshot implementation path against direct simctl io screenshot for the same booted simulator and output file location.
  • Preserve existing behavior for physical devices and any cases where the runner path carries required semantics.
  • Measure cold and warm screenshot latency before/after with a small repeat count, then a larger repeat count if a promising path exists.
  • Keep artifact/output semantics unchanged for callers: path handling, JSON output, error normalization, and diagnostics should remain compatible.

Acceptance Criteria

  • A local benchmark or test note shows current iOS simulator screenshot timing and the timing of any proposed fast path.
  • If a fast path is viable, implement it behind the existing screenshot command behavior without changing the public command contract.
  • If not viable, document the blocker with concrete evidence.
  • Add or update focused tests for path selection/error behavior where practical.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions