Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The thought of writing Java without IntelliJ makes me want to quick programming. Ironically, Kotlin might be great in a text editor despite being made by Jetbrains.


Do you use Kotlin with Gradle? I like Kotlin a lot, but it feels very slow on my laptop, do you know if there any special optimizations to make it faster?


I haven't shipped anything to production yet but I haven't noticed any build slow downs. I have only really worked through Koans repo to try and learn the paradigms. It can pretty much do anything Ruby, Python, JS, etc can do and it only costs you a 200KB runtime.

You might want to make you have parallel builds and the gradle daemon on for the gradle CLI. Android Studio seems to turn these on for you but if you build from the terminal I think they need to be specified in a gradle.properties file in the project root. You can also increase the amount of memory gradle is allowed to use.

As far as I know Kotlin does almost all of its magic at compile time so I am sure it will slow down builds slightly versus plain Java. From what I have seen so far I am more than willing to pay this price.

Here is a good overview with benchmarks from Square

https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhC...


Right, the runtime speed of Kotlin is very good. But the build times got much slower. An average java build with Gradle takes ~30 seconds on my pretty old laptop, but with Kotlin it is about 1 minute. Daemon and parallel are enabled in global gradle properties. I think running Kotlin compiler as a daemon would help, but I don't see an easy way to do that with Gradle.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: