RUM-15813: Cache reflection lookups in LayoutNodeUtils#3381
Merged
Conversation
41c43b4 to
c63143c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/3.9.0 #3381 +/- ##
=================================================
- Coverage 71.96% 71.81% -0.15%
=================================================
Files 948 948
Lines 34952 34973 +21
Branches 5804 5808 +4
=================================================
- Hits 25152 25113 -39
- Misses 8226 8267 +41
- Partials 1574 1593 +19
🚀 New features to boost your workflow:
|
f3de345 to
92787b0
Compare
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
0xnm
reviewed
Apr 23, 2026
92787b0 to
1cc6b4b
Compare
kikoveiga
previously approved these changes
Apr 23, 2026
kikoveiga
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just left some minor suggestions and the stale files FakeLayoutNodeUi.java & FakeLayoutNodeUiRelease.java are still present.
33478a9 to
6075149
Compare
kikoveiga
approved these changes
Apr 23, 2026
0xnm
approved these changes
Apr 23, 2026
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.
What does this PR do?
Caches reflection lookups in the Compose
LayoutNodeUtilsfallback path. Method handles forgetLayoutDelegate/getOuterCoordinator/getCoordinatesare memoized per concreteLayoutNodesubclass via aHashMap, and theLayoutCoordinatesKt.boundsInWindowreflection is resolved once through a lazyMethodreference.Motivation
Before this change, the reflection fallback (used until the Compose BOM bump in RUM-13454) ran a full
javaClass.methodslinear scan plus multipleClass.forNamecalls on every ACTION_MOVE hit-test, which is a hot path during touch tracking.Screen_recording_20260422_180800.webm
Screen_recording_20260422_180849.webm
Review checklist (to be filled by reviewers)