This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
For #8795: remove redundant ConstraintLayout around BrowserToolbar. #12014
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.
This is functionally equivalent to the code before this patch but should
be slightly more performant in theory because ConstraintLayout is
expensive to inflate.
The elevation and layoutParams set dynamically appeared to have no effect
with the wrapping view but broke the view when used by itself so I had
to remove them. I also updated a few other unnecessary params.
Theoretically this may have some perf benefits but I didn't see anything
outside noise levels after I took the numbers (but I didn't try very hard).
These were the perf results:
NO CHANGES
first click
5 runs, average: 470.4
[432, 493, 504, 484, 439]
subsequent
10 runs, average: 346.7
[352, 390, 362, 337, 334, 344, 305, 315, 398, 330]
REMOVE TOOLBAR_WRAPPER
first click
5 runs, average: 496.6
[490, 461, 443, 573, 516]
subsequent
10 runs, average: 344
[312, 352, 375, 342, 322, 380, 337, 333, 346, 341]
I suspect the first click is higher before because of the 573 outlier rather than a true regression.
Before:
After:
Scroll before:
Scroll after:
Pull Request checklist
After merge
To download an APK when reviewing a PR: