Skip to content

perf(android): reuse touch-helper preparation across scroll viewport and injection #1250

Description

@thymikee

Problem

Bare-ADB Android scroll legitimately runs two instrumentation modes: one to read the active interaction viewport and one to inject the planned gesture. The install decision is cached, but the current path prepares the touch helper twice and asks the snapshot helper to stop twice.

PR #1243 deliberately does not add a prepared-backend orchestration layer because the reviewed implementation increased the emitted JS bundle. Long-press no longer has this issue: its helper path skips the unused viewport probe entirely.

Acceptance criteria

  • Reuse one helper preparation across scroll viewport resolution and planned-touch injection.
  • Stop the snapshot helper once per scroll command.
  • Preserve provider-native behavior, structured helper failures, absolute returned coordinates, and exact planned samples.
  • Keep emitted JS raw and gzip size at or below the baseline; do not add fallback-specific tests.
  • Include focused call-count coverage and live Android helper evidence.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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