In my Scala/SBT project, I have one file that takes up to 5(!) minutes to compile. All the other ones can compile in a few seconds. This makes development pretty painful.
You can try the following Scala compiler options:
-Ystatistics
Print compiler statisticsFind a phase that takes the most time. Then, try those:
-Xprint:<phase>
Print out program after or "all"-Yshow-trees
Show detailed trees when used in connection with -print:phase-Ydebug
Output debugging messages-Ypmat-debug
Trace all pattern matcher activity.To enable these settings directly from the sbt console, you can use set scalacOptions in ThisBuild += "-Ystatistics"
, or for more than one, set scalacOptions in ThisBuild ++= Seq("-Yshow-trees", "-Ydebug)