Search code examples
scalaintellij-ideasbtsbt-plugin

Slow compilation with SBT


As mentioned by the lightbend devs, the activator is EOL-ed, so I switched to SBT. I downloaded version 0.13.15, installed it and started clean/compile in my project via terminal. The compilation took 535 seconds with SBT but with activator it was always below 150 seconds.

Can someone please help me to improve/decrease the compilation time again? Otherwise I'll switch back to activator because it is much more faster.

I'm using IntelliJ IDEA 2017.1.3. Even with build-in SBT shell the compilation time takes about 530 seconds and the guys from IntelliJ recommend me to raise this question here.

Let me know if you need any further information, thanks in advance, -Y-


Solution

  • It turned out that overcomplicated code was responsible for the increased compilation time (not linear to added/changed classes and logic). So a few classes and inheritances lead to 4 times increased compilation speed.