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

Sergey B

10/25/2019, 7:54 PM
Hi everyone. I'm really exited about jetpack compose. I know this is just a dev preview but I built "Jetnews" sample application and there is some lags when screen changes, I guess there planned some performance improvements. Also, I wanted to is there any solution for navigation eg. handling backpress etc?
a

Adam Powell

10/25/2019, 8:18 PM
it's doing a few silly things like decoding bitmaps on the UI thread and not caching them as you navigate around 🙂
a

Andy Gibel

10/25/2019, 8:25 PM
@Adam Powell you mentioned coroutines in your talk. Can I take that to mean you intend to have a first party solution for async resource loading ala Picasso? 🤞
s

Sergey B

10/25/2019, 8:29 PM
thank you Adam, makes sense 🙂
a

Adam Powell

10/25/2019, 9:17 PM
Maybe at some point; first I want to make sure we have all of the correct hooks in place such that you could integrate Picasso, Glide, Coil or whatever with their existing caching systems intact 🙂
m

Mihai Hrincescu

10/25/2019, 9:37 PM
@Adam Powell I was looking at the systrace and there is a big animation block on every frame even if no animations are running. I was curious why would it be there.
a

Adam Powell

10/25/2019, 10:00 PM
Probably Compose doing a lot of work on a frame animation callback pulse since it's guaranteed to run before the next frame
m

Mihai Hrincescu

10/25/2019, 10:37 PM
So the re-composition is driven by the animation callback?
@Adam Powell I figured it out turns out all the compose traces to not show up on
systrace
but they all show up nicely on the
perfetto-traces
that get recorded by the device, and it seems that the
Compose observers
get run by animation callback. (Edit: turns out they do show up but they are in the app space, and i was taking the trace wrong).
a

Adam Powell

10/25/2019, 10:57 PM
That work is unlikely to remain there long term, please pardon the dust 🙂
m

Mihai Hrincescu

10/25/2019, 11:12 PM
I was curious because the draw calls seem to be on par with the current view system which is to be expected since it uses the same rendering. But there was this animation block on all the traces that took big portions of the frame time.
6 Views