https://kotlinlang.org logo
a

Afzal Najam

10/09/2020, 3:04 PM
A question popped into my mind recently: how deep does the view hierarchy of Composables have to be to notice any performance hit?
j

jim

10/09/2020, 3:20 PM
Depends entirely on what you're doing in your composables. A tree of depth(1) is a problem if your composable function is calculating a precise value of
pi
inside its self. We've also seen very deep trees that had no problems. So, the answer is, it entirely depends.
🥧 1
👍 3
a

Afzal Najam

10/09/2020, 3:24 PM
Thanks Jim, that's very encouraging!
i

ian.shaun.thomas

10/09/2020, 3:26 PM
You should always calculate PI on the UI thread 😏
😀 8