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
Commit d8b6ce1
Browse filesBrowse the repository at this point in the historyBrowse files
perf(android): Hit-test gestures without getLocationOnScreen (#5595)
* perf(android): Hit-test gestures without getLocationOnScreen (JAVA-534)
ViewUtils.findTarget called View.getLocationOnScreen for every visited
view, and that walks from the view up to the root each time, making the
traversal O(N*depth) per tap and scroll start.
Instead, map the touch point down into each child's local coordinate
space as we descend the tree — the same way ViewGroup dispatches touch
events — so each view costs O(1) and the whole traversal is O(N). The
locators still receive the original decor-view-relative coordinates,
since the Compose locator hit-tests against window coordinates.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* changelog
* Update changelog
* test(android): Cover scroll and child matrix in findTarget hit-testing (JAVA-534)
The existing test only exercised the left/top offset path of mapToChild.
Add cases for a scrolled parent and a non-identity child matrix so the
other two coordinate-mapping branches are covered, and switch the class
to Robolectric so the real Matrix math runs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Move changelog entry to Unreleased as a performance improvement
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
### Performance
6
+
7
+
- Speed up touch gesture target detection on deeply nested view hierarchies by hit-testing in local coordinates instead of calling `getLocationOnScreen` per view ([#5595](https://github.com/getsentry/sentry-java/pull/5595))
0 commit comments