Merge pull request #3720 from eed3si9n/wip/3680

Improve testQuick performance, restoring caching of stamps
This commit is contained in:
Dale Wijnand 2017-11-08 08:50:26 +00:00 committed by GitHub
commit f380de79f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 15 deletions

View File

@ -766,21 +766,24 @@ object Defaults extends BuildCommon {
}
def intlStamp(c: String, analysis: Analysis, s: Set[String]): Long = {
if (s contains c) Long.MinValue
else {
val x = {
import analysis.{ relations => rel, apis }
rel.internalClassDeps(c).map(intlStamp(_, analysis, s + c)) ++
rel.externalDeps(c).map(stamp) +
(apis.internal.get(c) match {
case Some(x) => x.compilationTimestamp
case _ => Long.MinValue
})
}.max
if (x != Long.MinValue) {
stamps(c) = x
}
x
}
else
stamps.getOrElse(
c, {
val x = {
import analysis.{ relations => rel, apis }
rel.internalClassDeps(c).map(intlStamp(_, analysis, s + c)) ++
rel.externalDeps(c).map(stamp) +
(apis.internal.get(c) match {
case Some(x) => x.compilationTimestamp
case _ => Long.MinValue
})
}.max
if (x != Long.MinValue) {
stamps(c) = x
}
x
}
)
}
def noSuccessYet(test: String) = succeeded.get(test) match {
case None => true