Improve testQuick performance, restoring caching of stamps

This commit is contained in:
OlegYch 2017-10-27 19:29:19 +03:00 committed by Eugene Yokota
parent ee4dcee7cf
commit 6e29a1aa15
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