Status Update
Comments
ni...@google.com <ni...@google.com>
lp...@google.com <lp...@google.com>
lp...@google.com <lp...@google.com>
ap...@google.com <ap...@google.com> #3
After some brief poking around:
Relevant code in LayoutNode:
Ends up here:
If accessibility is off, looks like changing progress semantics a no op which would be a big improvement to performance.
Otherwise semantics does a remeasure / relayout, and walks the full semantics tree. This would likely have no immediate benefit if accessibility is turned on.
ap...@google.com <ap...@google.com> #4
Would this suggestion also avoid recomposing, which seems like it would still be a problem even if it's a no-op in the guts of semantic node code.
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #5
Indeed we could change the progressSemantics
API to be lambda-based like ScrollAxisRange, but I'm reluctant to add to our API for this. A number of properties are likely getting updated at high frequency by some application or other. Each one will add API clutter and add to the number of decisions developers have to make to optimize performance.
The semantics block is already a lambda, so we have been talking about being able to make it run separately from composition when one of its inputs changes, much like layout. Ralston is already starting to work on a performance-oriented rearchitecture to semantics and we can discuss how this might fit into that plan.
Description
Jetpack Compose release version: 1.0.3
Kotlin version: 1.5.30
Steps to Reproduce:
CheckBox(checked = true, onCheckedChange = null)
EXP: the checkbox is filled with the color
ACT: There are tiny pixels at the corners of the checkbox which are not filled with the color
I am able to reproduce this issue on Google Pixel 4 XL (which is 1440x3040 pixels and 537 ppi)
Zoomed screenshot is attached