perf: avoid Android hierarchy probe for scroll#671
Merged
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore Android scroll to the cheap display-size path so normal scroll commands no longer capture and parse a UI hierarchy before every swipe.
This regressed in d087a62 (#612), where scroll started resolving viewport size through Android UI hierarchy capture. In the Android perf comparison, scroll down moved from ~734ms daemon median to ~3410ms daemon median.
Adds a regression assertion that Android scroll does not invoke uiautomator/dump for the explicit-pixels path.
Scope
Touched 2 files: Android input actions and the existing Android platform test.
Validation
Verified with git diff --check and pnpm typecheck.
Checked for dead code around the removed Android scroll hierarchy probe: getAndroidGestureViewportSize, largestAndroidUiNodeRect, and android_gesture_viewport_probe_failed are gone; captureAndroidUiHierarchyXml and androidUiNodes remain used by Android fill verification/tests.
Ran pnpm check:fallow --base origin/main. It only flagged the unrelated untracked scripts/prototypes/* files that are not part of this PR; no Android scroll dead code was reported.
Ran the React Navigation Android Maestro suite from /Users/thymikee/.codex/worktrees/dffd/react-navigation/example using the built local agent-device binary: 37 passed, 1 failed in 340.3s. The failure was Stack - Preload Flow after returning from details and was not scroll-related; tab-view/scroll-related flows passed.
Verified the built Android snapshot path uses the new helper backend with androidSnapshot.backend="android-helper" and helperTransport="persistent-session". A patched source-mode run fell back to uiautomator because source mode lacked the packaged helper artifact, so it was not used as final backend validation.
Local pnpm vitest/format/build in this worktree are blocked by macOS native binding code-signature failures in rolldown/oxfmt/rspack optional bindings.