Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slow SBT start up with many projects

I have a SBT project with ~40 subprojects. There are several plugins, the largest of which are Play and sbt-native-packager. There are no global plugins.

On some fairly beefy hardware, start up (after the first time) takes 20-25 s. I know that it is not all due to JVM startup, since a small project (pure overhead) starts in 3-4s.

How can I find out why sbt is taking longer to start in the larger project?

I've tried sbt -Dsbt.task.timings=true, but it doesn't include what is taking a bulk of the time. After the last timing prints, but before

Set current project to example (in build file:/home/paul/lucid/example/)

there is a 15s pause.

How can I find what causes the slow start up?

like image 960
Paul Draper Avatar asked Apr 15 '15 17:04

Paul Draper


1 Answers

Try creating project/debug.sbt:

logLevel := Level.Debug

and see what you find. Often it's the compilation of the build files if you have project/*.scala.

like image 103
Eugene Yokota Avatar answered Sep 27 '22 17:09

Eugene Yokota