In terms of performance, is ConstraintLayout() mor...
# compose
g
In terms of performance, is ConstraintLayout() more "expensive" than layouting with other Composables, like in the old UI toolkit?
r
Kinda related: are the calculations done on a background thread? Not only for constraint but for compose as a whole. Is main thread only used for rendering?
z
The team has hand-waved about moving some work to background threads, but it hasn’t been done yet. https://kotlinlang.slack.com/archives/CJLTWPH7S/p1596732232381200?thread_ts=1596728706.378700&cid=CJLTWPH7S
👋 3
r
Rendering (real rendering, not rendering the way React and other toolkit wrongly call it :)) is done on a separate thread on Android
But we’ve been looking into mult-threaded composition, @Adam Powell can give you more detail
@galex Define more expensive. It depends on the layout you’re creating, what features you are using, etc. You should measure 🙂
g
@romainguy I was wondering if using
ConstraintLayout()
in Compose is still more efficient than multiple indented other
@Composable
but yes I need to measure that! Is there any tools to help measure the exact time of
rendering
of each
@Composable
or just a start time at the beginning and an
endTime
at the end would be enough?