with a column that contains several sub-items (e.g. inside a card). How can I optimize it such that the nested items arent recomposed all the time? Im seeing 3 recompositions each time the list is recomposed, taking up about 15 ms each; since Im also using a pager, the same process is repeated for pages to the left/right of the current one, effectively taking up 135 ms everytime the list recomposes.
Zoltan Demant
11/28/2021, 10:30 AM
What Ive tried:
⢠Marking the data with
@Immutable
⢠Using `ReusableContent`/`key(x){}` around the column items
c
Colton Idle
11/28/2021, 6:09 PM
Have you tried a release build?
z
Zoltan Demant
11/28/2021, 6:52 PM
@Colton Idle Yep, all of this is on a release build, R8 etc
t
Tash
11/28/2021, 9:07 PM
Curious, how are you measuring the durations?
z
Zoltan Demant
11/29/2021, 4:45 AM
@Tash
Copy code
val duration = measureTimeMillis {
// Render stuff
}