https://kotlinlang.org logo
#compose
Title
# compose
s

Stefan Oltmann

07/07/2022, 5:13 PM
I have a
LazyVerticalGrid
with a lot of boxes in it (containing images, it's a photo app). Each Box has a
Modifier.clickable { openElement(element) }
on it. If I remove this modifier my scroll speed is much faster. It seems to be a problem to create the lambda and modifier over and over again for each of the thousands of entries as a user scrolls by. Is there any way I can solve this in a away without creating a lambda for each entry?
👀 2
l

Lucas

07/07/2022, 5:19 PM
Have you tried a release build yet?
s

Stefan Oltmann

07/08/2022, 6:16 AM
Yes, even with
minifiyEnabled true
this is a problem. It seems to be costly to create and GC the lambda.
4 Views