Stan
03/11/2025, 10:53 AMorg.gradle.jvmargs=-Xmx16g -Xms6g -XX:+UseParallelGC -XX:+UseGCOverheadLimit -XX:GCTimeLimit=10 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseStringDeduplication -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options=-Xmx16g
Machine is mac with 32 gb RAM
Kotlin 2.1.10
Compose 1.7.1
During debug we can see that the issue is happening on devirtualization phase. Seems like it loading tons of compose related classes, but almost not unloading anything.tapchicoma
03/11/2025, 11:04 AMkotlin.native.jvmArgs
- by default it uses 3gStan
03/11/2025, 6:09 PMorg.gradle.jvmargs=-Xmx22g -Xms6g -XX:+UseParallelGC -XX:+UseGCOverheadLimit -XX:GCTimeLimit=10 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseStringDeduplication -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options=-Xmx22g -Dkotlin.native.jvm.options=-Xmx22g
and also separate line as you suggested
it just randomly fails in most of attemptstapchicoma
03/11/2025, 6:34 PMtapchicoma
03/11/2025, 6:35 PMStan
03/11/2025, 8:49 PMStan
03/12/2025, 10:35 AMtapchicoma
03/12/2025, 10:38 AMStan
03/12/2025, 11:28 AMStan
03/12/2025, 2:15 PMStan
03/12/2025, 2:35 PMStan
03/13/2025, 11:36 AMsergey.bogolepov
03/13/2025, 1:33 PM-Xdisable-phases=Devirtualization
with something like
kotlin.targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget> {
binaries.all {
freeCompilerArgs += "-Xdisable-phases=Devirtualization"
}
}
Note that it affects all other release optimizations, thus runtime performance.
What if you run builds sequentially instead of parallel?sergey.bogolepov
03/13/2025, 1:41 PMStan
03/13/2025, 1:46 PMStan
03/13/2025, 1:47 PMStan
03/13/2025, 4:40 PMBrill
03/14/2025, 3:07 PMStan
03/20/2025, 12:08 PMsergey.bogolepov
03/21/2025, 1:42 PMStan
03/21/2025, 2:15 PM