we experience a lot of lag when LazyColumn adds a ...
# compose
i
we experience a lot of lag when LazyColumn adds a new portion of composables. What can we do to mitigate it? it’s a calendar with a lot of distinct Text()’s each month
c
Are you testing performance in debug builds or release builds? The performance of release builds is known to be better than debug, for compose.
i
It's debug mostly, we have just started. But the lag is so drastic, it obviously won't go away on release builds. The lag happens when a new portion of items is being added to LazyColumn
c
The difference between debug and release builds is noticeable. You can search this channel for many of the same questions; it comes up often. I'm not saying you don't have a performance problem, but you should make sure to always measure performance in release builds, not debug.
👍 1
c
Yeah. Try a release build ORRR at the very least add
debuggable = false
flag to your debug build config in build.gradle just to see how perf improves.
z
Are your list items homogenous? If not, make sure to specify the item type so compose can more efficiently recycle list nodes
d
@Zach Klippenstein (he/him) [MOD] Could you provide more info on how we can specify the item type in
LazyColumn
?