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

Jeff

01/04/2021, 8:05 AM
Does anyone talk about the performance of Jetpack Compose? I have tried various samples e.g JetNews and the scrolling, behavior and transitions of different elements does not match native elements like RecyclerView. Is this expected because compose is not fully native?
1
m

Marko Novakovic

01/04/2021, 8:16 AM
JetNews is not implementing
RecyclerView
. it uses
ScrollableColumn
which is not equivalent of the
RecyclerView
s

Shakil Karim

01/04/2021, 8:24 AM
@Jeff I feel exactly the same, Performance of LazyColumn is not even close to a native view like RecyclerView, I create an issue, please star it, or maybe you can create another issue https://issuetracker.google.com/issues/176523912
g

gildor

01/04/2021, 5:47 PM
There is nothing non native in compose, it's just matter of current implementation performance
5
j

Jeff

01/04/2021, 5:49 PM
@Marko Novakovic we are on the same page on that.
👍 1
@Shakil Karim 👍
@gildor I see. Are you concerned about the performance?
s

Sam

01/04/2021, 7:50 PM
something worth mentioning of what’s missing from
LazyColumn
is prefetching, i.e. the ability to fetch+preload images before views are actually rendered. obviously not the entire scope of performance problems though, hopefully things get much better soon
👍 1
y

Yashar

01/04/2021, 9:04 PM
I am unable to look into the source code of Jetnews at the moment, but the sluggish
lazy column
isn’t due to the
imageResource()
function correct? Last time I checked, it was loading images synchronously and causing a noticeable lag.
a

Adam Powell

01/05/2021, 3:39 PM
Known issue in some of the touch handling for showing ripples. cc @matvei
s

Shakil Karim

01/06/2021, 7:41 AM
Ripple showing while scrolling could be one of the reasons for frames skip in LazyColum.
m

matvei

01/08/2021, 11:57 AM
Ripples should be delayed a little bit in the scroll containers, that's what happening in views and recycler view. It's not the case for compose, but we're looking into it, thanks
s

Shakil Karim

03/14/2021, 1:20 PM
@matvei I'm still facing this issue in Beta 2, is there any way to disable it ?
m

matvei

03/15/2021, 11:00 AM
Not fixed yet, still on our radars. I don't think you can disable it anyhow other than implementing your own ripples and delaying them, but even that would be a workaround
👍 1
j

Jeff

03/19/2021, 8:05 AM
How about the poor scrolling. The scrolling of items and calendar days in the Crane sample app is very poor. It's like frames are dropping. Not a match to RecyclerView
💯 1
9 Views