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

Mbt925

02/26/2024, 10:07 AM
Hey 👋, I am wondering if it has an impact on the performance if multiple padding modifiers are chained together? Is
Modifier.padding(top=8.dp, start=4.dp, end=4.dp)
more performant than
Modifier.padding(top=8.dp).padding(start=4.dp, end=4.dp)
s

Stylianos Gakis

02/26/2024, 10:39 AM
My guess would be that this should be negligible, just do what reads better in your codebase
👆 1
m

Mbt925

02/26/2024, 10:57 AM
What I meant was from the compiler point of view. Will there be some optimization involved that would just merge these two into one?