Display log when sbt loading is going to pause

Def.make could take 10099ms for 100 subprojects. This would display
logs probably for projects with more than 10 subprojects, which might
pause for a few seconds during load.
This commit is contained in:
Eugene Yokota 2016-05-25 01:51:07 -04:00
parent 0f43d21e72
commit c67b3881de
1 changed files with 4 additions and 0 deletions

View File

@ -154,6 +154,10 @@ object Load {
}
val delegates = timed("Load.apply: config.delegates", log) { config.delegates(loaded) }
val data = timed("Load.apply: Def.make(settings)...", log) {
// When settings.size is 100000, Def.make takes around 10s.
if (settings.size > 10000) {
log.info(s"Resolving key references (${settings.size} settings) ...")
}
Def.make(settings)(delegates, config.scopeLocal, Project.showLoadingKey(loaded))
}
Project.checkTargets(data) foreach sys.error