Performance when using sbt 0.12 to compile scala 2.10 project

114 views
Skip to first unread message

rkl...@gmail.com

unread,
Feb 14, 2013, 3:44:17 AM2/14/13
to simple-b...@googlegroups.com
Hi all,

now that I finally managed to get my large project to build with sbt 0.12 and scala 2.10 after explicitly specifying the sbt version in project/build.properties, I noticed that the build time is much longer when I use the scala 2.10 branch than when I use the master branch, which is still on scala 2.9.2.

I estimate build performance by doing "sbt clean compile" on the root project (is there a better way?). I get 131s for the scala2.10 branch and 84s for the master branch. This is on a brand new machine. Some of my colleagues have older machines. So given that scalac is not that fast to begin with, any slowdown is highly unwelcome.

What is the reason for the slowdown? Has scalac become even slower in 2.10, or is it because sbt itself is using a different version of scala than the one used by scalac? If it is the latter, would it help to make sbt itself use scala 2.10 somehow? If so, how?

Any help would be greatly appreciated. I am trying to get my colleagues to buy into having an automatic build based on sbt rather than having individual handcrafted IDEA projects, and so far they don't seem too enthusiastic. A decrease in performance will definitely not be helpful...

best regards,

Rüdiger

p.s. This is sbt about on the scala2.10 branch:

[info] Loading global plugins from /home/rklaehn/.sbt/plugins
[info] Loading project definition from /home/rklaehn/projects_git/satmon3/project
[info] Set current project to root (in build file:/home/rklaehn/projects_git/satmon3/)
[info] This is sbt 0.12.2
[info] The current project is {file:/home/rklaehn/projects_git/satmon3/}root
[info] The current project is built against Scala 2.10.0
[info] Available Plugins: com.typesafe.sbteclipse.plugin.EclipsePlugin, org.sbtidea.SbtIdeaPlugin, sbtassembly.Plugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.9.2


virtualeyes

unread,
Feb 14, 2013, 4:04:54 PM2/14/13
to simple-b...@googlegroups.com
I've noticed a slowdown, but not in regard to initial clean/compile, that is @same as with 2.9.2.

The slowdown occurs with subsequent clean/compiles where in 2.9.2 caching takes affect, significantly reducing build times, usually by at least a factor of 2.

With 2.10 there appears to be, for some reason, no caching whatsoever. If a project takes 100seconds on initial sbt> clean/compile, it will take the same time for every subsequent clean/compile, not ideal.

Anyway, in most cases incremental builds are reliable enough to avoid full compilation penance, I mean, performance.
Reply all
Reply to author
Forward
0 new messages