sbt refresh slow -- questions

We've got a multi-project sbt project with ~10 subprojects, with many common dependencies.

Whenever we tweak the top-level build.sbt and click the "refresh project" link that pops up (we don't use auto-import), it takes several minutes refreshing all the subprojects' dependencies, even though most of them are shared.  Similarly if we click the "refresh all projects" button on the sbt window.

If we use sbt interactively though, reloading and updating (via "reload" and "update" commands) take only a few seconds.

We're using sbt 0.13.9 (earlier versions were equally slow) and are using these suggested settings in the build.sbt which don't help (much) within Intellij:

    aggregate in update := false
    updateOptions := updateOptions.value.withCachedResolution(true)

What sbt commands is Intellij running when refreshing projects?

Are there any Intellij config. settings or other ways to speed this up?

thx,
Chris

31 comments
Comment actions Permalink

In my case we use sbt-coursier so I guess IDEA uses it transitively as well. 

What I find strange is that even after editing non-dependency related configuration in build.sbt IDEA re-downloads all dependencies. Even the ones with stable version (i.e. non-SNAPSHOT) which are already in ~/.ivy/cache/***. If this download of deps which are already available is skipped I expect the reload of the project to be much faster!

0

Please sign in to leave a comment.