Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

241
Visualizações
Kotlin extremely slow compile time

Why is compiling and running Kotlin extremely slow (at least on my machine)? I have the latest version of Kotlin compiler installed on my machine.

Specifically the command:

kotlinc main.kt -include-runtime -d main.jar && java -jar main.jar

It's so slow that printing "hello word" takes up to 9 seconds.

I initially thought that it is slow by default (I used dDcoder app) but now I've used the online playground and Sololearn it's much more faster.

My PC is running Windows 10 with Core i5 and 4GB RAM.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

This is usually a common complaint among Kotlin users, especially when compiling a project for the first time. Unfortunately, there's nothing you can do about it, your PC spec is sufficient for an effective build and run of Kotlin project.

My advice, for offline compiling, use Intellij IDEA. This IDE has the most efficient support for Kotlin... as it is produced and managed by Jetbrains.

If you use Intellij IDEA already, The project will take less time to compile from first build.

I had the same complaint when I started working with Kotlin from Java. Java's compile time is faster, and there's nothing you can do about the compile time difference as of the present.

over 4 years ago · Santiago Trujillo Relatório

0

Maybe I'm biased, but I think it is unusual to compile Kotlin code this way, so it is not that well optimized. Usually, we use either IntelliJ or Gradle (or Maven), not kotlinc directly. Gradle can cache compiled code, it can run a background daemon to not re-initialize everything with each build, etc.

If we create a Gradle project, even consisting of several submodules, with some multiplatform modules, etc. then running it repeatedly with minor changes takes less than a second each. Even if changes are spread among several submodules, so Gradle has to build all of them.

Having said that, compilation time is a common problem in Kotlin right now. I believe optimizations are somewhere near the top of the Kotlin team priority list, so hopefully we'll see some improvement in the near future. As for now, it is considered a problem for some people.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda