So I've given `./gradlew assemble -Pkotlin.experim...
# k2-adopters
s
So I've given
./gradlew assemble -Pkotlin.experimental.tryK2=true
with Kotlin 1.9 a try on https://github.com/oss-review-toolkit/ort under Linux. Good news: All my 20 CPU core went at a 100% quickly, seems like parallel compilation works great. Bad news: It made my notebook, whose fans were going crazy, completely non-responsive. I couldn't even move the mouse cursor anymore, and it also didn't calm down after several minutes. Is this a known issue?
s
Highly likely it is caused by running out of memory, especially if you're using Linux (due to continuous swapping) I also would like to point out that K2 doesn't interfere with memory management of the compiler and should behave similarly to K1
The potential difference lies behind the fact that K2 might use more memory and cause such kind of problems
s
Is there any work-around for that? I mean, I would have no problem with the compiler throwing an OOM exception. But hanging my whole machine is bad...
s
It is general JVM issue, so it should be handled by disabling swap on your system to allow OOMKiller to happen or providing proper memory limits to JVM that is hosts kotlinc