Is there any performance improvement/benefit in us...
# compose
s
Is there any performance improvement/benefit in using `lazy Column`/`Row` vs `verticalScroll`/`horizontalScroll` if there are only 5 to 10 items to show? but items will recompose multiple times.
z
I’m gonna say no. Might even be better for a small number of items because subcompositions aren’t free. But in general, if you’ve got small lists, very few decisions around how you process those lists ever have any significant performance implications.
👍 1
s
Row/Col even simpler to use 🙃
z
Some more things to consider are: 1. Whether you need intrinsics support on your column children - lazy lists don’t support them yet. 2. How you want text selection to behave if your column contents are selectable. If you select text in a lazy list then scroll it out of view, it will lose your selection.
👍 2
s
@Zach Klippenstein (he/him) [MOD] Thanks, didn't know those limitations. i have fairly simple item with image and Card. but isn't looping over item 10 item in scrollable Row with cause slight delay When Composable visible, because it will draw all 10 item egarly?
z
Are you seeing a delay?
A typical screen has way more than 10 composables in it, if the compose runtime can’t handle 10 composables then it’s in big trouble.
👍 2
s
On most devices i have tested on is working fine, but on the Low end devices i am facing a noticable delay, I have screen with a vertical Column with around 10 nested Row and each Row have 10 to 15 Card Item.
z
Is it better with
LazyColumn
on those devices?
t
@Shakil Karim the delay happening with release build also ?
s
Actually, it was a different issue, As zach mentioned it shouldn't be a problem with loading few Composable.
🆗 1
@theapache64 Yes, it is a Playstore build with R8 enable as well.
😶 1