Looking for help in sizing `-Xmx` of the Kotlin d...
# gradle
v
Looking for help in sizing
-Xmx
of the Kotlin daemon in my project. I see that a big chunk of compilation is being done in
org.jetbrains.kotlin.gradle.*
tasks. (all these tasks run in the daemon, right?) Contrary to my expectations, my builds are performing well (minimal GC time) with low
-Xmx
like
-Xmx=1536m
for Kotlin daemon and
-Xmx=5g
for Gradle daemon. I'm using the default compilation strategy where in Kotlin daemon runs as a separate process What can explain this?
BTW, I tried flipping the ratio, i.e. lower Xmx for Gradle and higher Xmx for Kotlin (like 4g for Kotlin and 2.5g for Gradle) - it resulted in OOMs.
t
yes,
KotlinCompile
and
KaptGenerateStubsTask
should use Kotlin daemon. You could attach VisualVM (or other tool) to the KotlinDaemon process and inspect there heap usage
v
Will do, thanks!
Tried VisualVm.
KotlinCompile
and
KaptGenerateStubsTask
do take up significant CPU but not so much with respect to memory