Status Update
Comments
sg...@google.com <sg...@google.com> #2
Thanks for the report and all the details. Are you only seeing these build speed issues on CI? What's the build speed like in local development?
It would be great if you could share the compiler dump file with
ja...@gmail.com <ja...@gmail.com> #3
Are you only seeing these build speed issues on CI? What's the build speed like in local development?
Hi, we usually don't run minified builds on our local environments, mainly because of the time it takes to run it and the amount of ram it would require.
I don't want to complain even more about it, but I'm sure you are already aware of the constraints that Android has. We already have the IDE taking +10GB, the Kotlin Compiler daemon (1-6GB depending on the compilation work needed), the Gradle daemon (usually around 14G at the end of the build). If we were to enable R8 on local builds, this would render local machines (even our beefy M1s) unable to use for minimum 15 minutes each time we would want to run the app. Devs will turn this off immediately.
A good starting point would be to check if there are any passes that take up an unusual amount of time.
Do you mean running the compiledump.py
? Is this what the dump will be used for? If so, can I do that locally without any external tool? I'd rather not share the dump if I can test it myself. If there is more to it, then I'll try to upload it somewhere safe.
ja...@gmail.com <ja...@gmail.com> #4
Do you mean running the compiledump.py? Is this what the dump will be used for? If so, can I do that locally without any external tool? I'd rather not share the dump if I can test it myself. If there is more to it, then I'll try to upload it somewhere safe.
Running compiledump.py --print-times
can give some insights into whether an unusual amount of time is spent in some compiler pass. It may be necessary to manually dig deeper into where time is spent in a given pass. If compilation time is spread evenly across the various compilation stages then the issue may be due to the sheer size of the input, but this is difficult to tell without access to the dump.
./tools/compiledump.py -d dump.zip --disable-assertions --print-times --java-opts "-Dcom.android.tools.r8.printtimes.minvalue=0"
If you can share the stdout of running the above command that would be great.
Description
Please, see issue I reported to the Coil 3 and got referred herehttps://github.com/coil-kt/coil/issues/842#issuecomment-2382466977 .
Stacktrace:
java.lang.ClassFormatError: Invalid index 2 in LocalVariableTable in class file coil3/compose/internal/UtilsKt at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) at coil3.compose.AsyncImageKt.AsyncImage-76YX9Dk(AsyncImage.kt:161) at coil3.compose.AsyncImageKt.AsyncImage-QgsmV_s(AsyncImage.kt:132) at coil3.compose.SingletonAsyncImageKt.AsyncImage-gl8XCv8(SingletonAsyncImage.kt:125)
Even though my Proguard rules contain both
-keep class coil3.** { *; }
and for Ktor: