Hi Kotliners! We have been running kotlin in some ...
# announcements
Hi Kotliners! We have been running kotlin in some greenfield projects for about 2-3 years and we've been super happy with it. It has started to gain a lot of traction in our company but lately we've heard about people who experience kotlin to be super slow build-time and development time. This is especially when you have a bit bigger projects who are running a mix of Java and Kotlin. Does anyone recognize this issue and knows if there's any intellij-trick you could do to get a smoother experience?
JetBrains knows about this and the latest EAP of IntelliJ is a little better, however, in general this is a big issue…
Agreed. If you're only using Java libraries, and no Java source code, then your project can grow more before you'll have issues. Nothing concrete on what constitutes 'big enough' or 'complicated enough' to start causing issues. Many people having issues with larger combined projects, though. Obviously JB is working on this, as this is one thing that has hurt Scala adoption, and they don't want it to apply to Kotlin, too. But do keep in mind that the Kotlin compiler does more than the Java compiler, so it will tend to be slower. And has to do even more if you have a Java/Kotlin project. And almost forgot to mention. Kotlin 1.4 release is focused heavily around a major refactor of the compiler, with great speed improvements. If this lives up to its promise, it will also help the IDE be faster. Some details from Kotlinconf around the 17 minute mark.


Noticed Idea slowing down drastically after some point while project grew, using mixed java+kotlin+groovy(using some hacks on code assembly via gradle) codebase
We’re using lots of kotlin in a pretty big codebase, and this is definitely an issue for us. The best mitigation has been modularization. The more code your build system can cache and avoid building altogether, the less you’ll feel kotlin’s performance issues. However, there are major performance regressions in some of the tooling since 2018. IntelliJ 2019.x and 2020.1 with any recent version of the kotlin plugin are completely unuseable in our codebase, so most of our devs are still using 2018.3 with an old version of the kotlin plugin. We’re very actively talking with JetBrains to resolve these issues, but they seem really understaffed and probably won’t be able to ship fixes until mid-2020. That said, if you’re just starting to introduce kotlin incrementally into a large codebase, I doubt you’ll run into any serious issues anytime soon as long as you’re well-modularized.
Thanks a lot for confirmation around the issue, at least I won't having to spend a lot of hours chasing microoptimizations 😋