Are there any SBT options, JVM options or Scala compiler options that would positively or negatively influence SBT's startup and compile time. What are the options that I can play around with? Documentation is very poor and doesn't specify anything.
Background: I switched from from a 2 year old Macbook Air to a brand new Macbook Pro. Same OS, same configuration. The new one, has a much faster CPU and twice as much memory. For some reason, starting SBT and compiling my Play2 application is significantly faster on my old, much weaker, machine. The difference is consistently as high as 10 seconds compile time.
Turns out it was 2 things:
There was a conflicting dependency on SLF4J, which caused an SBT warning every time it started. I assume SBT tried to resolve the dependency in the background, significantly slowing down startup speed. Once that was removed, I saved 3-4 seconds.
When the compilation of the Play2 application was triggered by hitting http://localhost:9000 in the browser, there was another issue related to the hostname. I don't know exactly why this was having such a big impact, but after running scutil –set HostName “localhost”
I reduced the time it takes to compile the application and get the Play2 application in the browser by nearly 10 seconds!
So overall, these 2 little changes saved me more than 10 seconds in the development cycle. I hope somebody finds this useful as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With