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
Alex Styl
09/19/2024, 11:49 AM
not that i know of, but desktop is normally crazy fast anyway
Alex Styl
09/19/2024, 11:49 AM
are u asking this for a particular reason?
d
dimsuz
09/19/2024, 12:32 PM
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
Rok Oblak
09/19/2024, 12:40 PM
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
Albert Chang
09/19/2024, 1:24 PM
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
Rok Oblak
09/19/2024, 1:36 PM
@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
dimsuz
09/19/2024, 2:14 PM
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.