Compose for Android is usually running in a "debug...
# compose-desktop
d
Compose for Android is usually running in a "debug" mode which is slower and some optimizations are enabled only in the "release" mode. Is this similar for compose-desktop? If yes, how do I run it in a mode with all the compose optimizations enabled?
a
not that i know of, but desktop is normally crazy fast anyway
are u asking this for a particular reason?
d
Not really. I just want my app to stay crazy fast and I'm about to introduce some "heavier" processing and plan to use the profiler to find hot spots right away — and wanted to be sure that I'm profiling the fastest version of Compose setup 🙂
r
You can and should enable proguard for desktop. For compose the optimizations should be significant. Though I cannot honestly see a difference on a fast computer since JVM these days is crazy fast.
a
On desktop, debug mode (when you attach a debugger to the JVM) has negative impact on performance as well. Also code optimizers like R8 can improve performance. But the difference may not feel that big as on Android.
r
@dimsuz you can run corresponding gradle tasks to run in release mode (which applies proguard obfuscation if you have it setup) proguard also strips out ~50% of the file size
d
Oh, nice, thanks everybody! I will try to add it later then. I recall I have seen some proguard related issue on compose-jb github earlier, there may be some rules described there.