1

kotlinc -include-runtime -d hello.jar hello.kt or simply kotlic hello.kt takes over 10 seconds with the below hello word program.

fun main() {
  println("Hello, world")
}

I have used oracle's and openjdk's java 17. I am using kotlin 1.80. I have tested it on two Linux machines. I have installed kotlinc using the source and using SDKMAN! I have 4gb of RAM. The same incredibly slow compile time results.

When I compile using javac it is no more than a second for a far more complex project.

Is there any way to speed up the kotlin compile time without using IntelliJ IDEA or gradle?

mmm111mmm
  • 3,607
  • 4
  • 27
  • 44
  • Maybe try other JDK versions, i had issues with JDk 17 in the past so i use JDK 8 OR JDK 11. – MESP Jan 26 '23 at 10:23
  • I have just now tried it on JDK 11. It was as slow. – mmm111mmm Jan 31 '23 at 20:51
  • In fact, even if use a simple gradle script, gradle takes over 40 seconds to build the first time, and then about 10 seconds to build and run on subsequent runs using gradle's daemon, and another process, which in total is about 500mb of RAM. All toget – mmm111mmm Jan 31 '23 at 21:02

0 Answers0