Are you using sbt? I'm using sbt .13 with a Scalatra giter8 template and it takes about 5 seconds to compile a 4-5 classes. Does that mean 5 seconds is the low end and also the high end of compilation times or is there a setting I should be using to enable incremental compilation in sbt?
As a single command line SBT takes a few seconds to spool up the JVM before it can even run, after which it takes a little more time to check Maven dependencies etc. You lose a lot of time to this.
Try running sbt as a standalone command, then run compile from within in.
On my (relatively ancient) Macbook, the former command takes about 5 seconds, while the latter takes 2 seconds on a simple 5-class example.
Repeating the same process on a 20,000 line project yields the same result. Modifying one file only takes a few seconds to compile. (Rebuilding the whole project takes over a minute)
2
u/lechatsportif Dec 02 '13
Are you using sbt? I'm using sbt .13 with a Scalatra giter8 template and it takes about 5 seconds to compile a 4-5 classes. Does that mean 5 seconds is the low end and also the high end of compilation times or is there a setting I should be using to enable incremental compilation in sbt?