Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug: b/161809385
Bug: b/161807956
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
https://android-review.googlesource.com/1394868
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug:
Bug:
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
ml...@google.com <ml...@google.com> #3
Did some benchmarks in Jetcaster when slow scrolling. 32 less compositions.
ScrollBenchmark_fixedScaffold
Scaffold.contentCount min 2.0, median 2.0, max 3.0
Scaffold.contentSumMs min 0.5, median 0.9, max 1.1
frameCount min 198.0, median 198.0, max 498.0
frameDurationCpuMs P50 4.9, P90 6.6, P95 8.7, P99 24.1
frameOverrunMs P50 -7.5, P90 -3.4, P95 0.6, P99 21.7
ScrollBenchmark_normalScaffold
Scaffold.contentCount min 34.0, median 37.0, max 37.0
Scaffold.contentSumMs min 16.7, median 17.5, max 17.7
frameCount min 219.0, median 225.0, max 231.0
frameDurationCpuMs P50 5.0, P90 6.9, P95 9.1, P99 27.0
frameOverrunMs P50 -6.6, P90 -3.1, P95 0.1, P99 18.8
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.8.0-alpha05
androidx.compose.material:material-android:1.8.0-alpha05
androidx.compose.material:material-jvmstubs:1.8.0-alpha05
androidx.compose.material:material-linuxx64stubs:1.8.0-alpha05
androidx.compose.material3:material3:1.4.0-alpha03
androidx.compose.material3:material3-android:1.4.0-alpha03
androidx.compose.material3:material3-jvmstubs:1.4.0-alpha03
androidx.compose.material3:material3-linuxx64stubs:1.4.0-alpha03
Description
Adding a
scrollBehavior
to aTopAppBar
causes theinnerPadding
property to recompose with the layout changes of the appbar. TheinnerPadding
propery is then passed into thecontent
lambda, which is read in composition and therefore recomposing thecontent
on every frame causing huge performance issue givenScaffold
is used usually per-screen.Deferring reading the
innerPadding
in the userland code doesn't fix the issue.Reproducible snippet:
This behavior also affects
material.Scaffold
, which can be fixed as well.