I heard that having R8 disabled will have a signif...
# compose
s
I heard that having R8 disabled will have a significant impact on Compose Render time. I was just reading this article about it. I was just wondering if Google recommends to enable R8 for compose?
👌 5
a
Yes, we recommend enabling r8
k
Does R8 have specific optimizations for Compose?
a
no, but many of its general-purpose optimizations are very helpful for compose
lambda-heavy code in particular tends to benefit quite a bit
not to mention it will omit a lot of unused code; any parts of the compose libraries themselves that you aren't using, any
@Preview
functions and associated utilities that you may have in your existing source files...
4
s
Is stripping @Preview composables a specific optimization or just due to the fact that they're not called explicitly? What if we do call them from somewhere, they're not stripped then right? What if a library uses them, like showkase uses them from the generated code 🤔
a
the result of not being called explicitly. If you generate code that calls them, that will still work.
👍 1