I used Kotlin with the latest version of Eclipse for 2 months without any performance issues on my Windows 10 computer. Now I would like to make a live coding session about Kotlin with intelliJ (since it is the JetBrains language ...), which I just installed and never used before in a recent OSX computer. These two computers have good hardware and do not limit my tests.
My problem is that every time there is a modification in my Kotlin code, the compilation time is between 8 seconds and 35 seconds . I performed my tests with minimalist code:
class TestKotlin { var a = 1 }
If I change the variable "a" and therefore need to be built again, it always takes 8 seconds to complete the compilation in the best cases.
Since I want to make a live encoding session with many small functions and compilations, this delay is too significant. Viewers will need to wait much earlier to see the results on each compilation, they logically expect good performance from the IntelliJ tool.
In the same project, I tried to make the same Java class (with one attribute) and change its attribute to cause compilation, and it takes less than 1 second to compile.
I tried to manually compile the code on the command line with:
kotlinc hello.kt -include-runtime -d hello.jar java -jar hello.jar
I had decent compilation time, even if it was about 3 seconds .
When I look at the Messages screen in IntelliJ, when it compiles the Kotlin code, I see this:
Information:Kotlin: Kotlin JPS plugin version 1.0.6-release-127 Information:Kotlin: Using kotlin-home = /Users/myUsername/Library/Application Support/IntelliJIdea2016.3/Kotlin/kotlinc
It stops here for the entire compilation time, and then takes the following steps almost instantly:
Information:Kotlin: Kotlin Compiler version 1.0.6-release-127 Information:17/01/17 11:38 - Compilation completed successfully in 11s 639ms
There may be a problem in the IntelliJ configuration or something like this. It was difficult for me to find something that could improve my performances, but nothing helped me ...
I would really appreciate it if someone could help me get realistic compilation times with Kotlin in Intellij, like in Eclipse!