mirror of https://github.com/sbt/sbt.git
At some point I noticed that projects with no scala sources in the build loaded significantly faster than projects that had even a single scala file -- no matter how simple that file was. This didn't really make sense to me because *.sbt files _do_ have to be compiled. I finally realized that classloading was a likely bottle neck because *.sbt files are compiled on the sbt classpath while *.scala files are compiled with a different classloader generated by the classloader cache. It then occurred to me that we could pre-fill the classloader cache with the scala layer of the sbt metabuild classloader. I found that compared to 1.3.0-M5, a project with a simple scala file in the project directory loaded about 2 seconds faster after this change. Even if there are no scala sources in the build.sbt, there is a similar performance improvement for running "sbt compile", which I found exited 2-3 seconds faster after this change. |
||
|---|---|---|
| .. | ||
| src | ||