Hacker News new | ask | show | jobs
by cs-szazz 1890 days ago
I used Kotlin in a large codebase, and one of my only complaints is the compile times. We use Gradle for our build system, and relative to Java it is slooowwww. But we like the other benefits of Kotlin, so it's worth it in the end. But if they could get compile times down, it'd be the perfect language imo.
2 comments

1.5.0-RC was released a few days ago and contains rewritten compiler code which promises significant speed improvements.
It sure does, I updated everything a few days back and was really amazed. Everything is faster, even syntax highlighting.
We're already using the new IR compiler on 1.4, but I'll check out 1.5!
How large is the codebase? I moved to kotlin from scala and find the compilation to be rapid in comparison.

Fwiw, I’m normally on a beefy desktop so I might just be brute forcing this issue.

11,503 files, 1,431,195 lines of code. (spread out over <50 Gradle modules).

I think the main problem is that Gradle doesn't have the same support as Java for ABI compatible changes, so invalidation of modules are more common.

This article points to ABI as an open optimization problem in kotlin:

https://blog.jetbrains.com/kotlin/2020/09/the-dark-secrets-o...

I think you're right - ABI compatible changes are likely the culprit.