aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-03-19 20:01:09 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2017-03-27 23:54:15 -0400
commit6b37681f94056f05cf545fbb1e483dabbfa8492c (patch)
tree172c06f7bfee33bae5708209d1eeb8a418caaba1
parent52adb81450955472fe4ecd011615b80f6289def6 (diff)
downloadcbt-6b37681f94056f05cf545fbb1e483dabbfa8492c.tar.gz
cbt-6b37681f94056f05cf545fbb1e483dabbfa8492c.tar.bz2
cbt-6b37681f94056f05cf545fbb1e483dabbfa8492c.zip
performance tweak: cache dependencyClasspath (major)
-rw-r--r--stage1/resolver.scala12
1 files changed, 7 insertions, 5 deletions
diff --git a/stage1/resolver.scala b/stage1/resolver.scala
index 1eaeebd..e485823 100644
--- a/stage1/resolver.scala
+++ b/stage1/resolver.scala
@@ -119,11 +119,13 @@ trait DependencyImplementation extends Dependency{
// FIXME: these probably need to update outdated as well
def classpath : ClassPath = exportedClasspath ++ dependencyClasspath
- def dependencyClasspath : ClassPath = ClassPath(
- transitiveDependencies
- .flatMap(_.exportedClasspath.files)
- .distinct // <- currently needed here to handle diamond dependencies on builds (duplicate in classpath)
- )
+ def dependencyClasspath : ClassPath = taskCache[DependencyImplementation]( "dependencyClasspath" ).memoize{
+ ClassPath(
+ transitiveDependencies
+ .flatMap(_.exportedClasspath.files)
+ .distinct // <- currently needed here to handle diamond dependencies on builds (duplicate in classpath)
+ )
+ }
def dependencies: Seq[Dependency]
/** return dependencies in order of linearized dependence. this is a bit tricky. */