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

Nick Kleban

10/24/2023, 4:27 PM
Is it possible to have “release” performance of compose in a custom buildType. If so, what is proper configuration for it? Right now I have a custom buildType for a manual testing purposes where:
Copy code
isDebuggable=true
isMinifyEnabled=true
d

dorche

10/24/2023, 4:33 PM
The buildType itself is not the problem but if you want it debuggable then no, you won't get "release" performance
n

Nick Kleban

10/24/2023, 4:37 PM
Do you know what exactly defines what kind of performance I would get? Only
isDebuggable
or some combination of buildType params?
d

dorche

10/24/2023, 4:42 PM
I think it's the combination of debuggable + running r8 (not sure if resource shrinking plays a big part) https://developer.android.com/build/shrink-code
a

ascii

10/24/2023, 8:12 PM
Even if you have minification enabled, debuggable builds still include a lot of — wait for it — debug code, which skews your performance metrics. It will never match release performance, which is usually minified AND non-debuggable.