mirror of https://github.com/sbt/sbt.git
Don't use managedCache for library stamps
Using the managedCached introduced an unintended performance regression because it ensured that we always computed the hash of each jar on the dependency classpath. The backing ReadStamps only computes the stamp if the timestamp of the jar has changed.
This commit is contained in:
parent
b345205c28
commit
c9dc041643
|
|
@ -231,13 +231,7 @@ object Defaults extends BuildCommon {
|
||||||
def getAllSourceStamps()
|
def getAllSourceStamps()
|
||||||
: java.util.Map[xsbti.VirtualFileRef, xsbti.compile.analysis.Stamp] =
|
: java.util.Map[xsbti.VirtualFileRef, xsbti.compile.analysis.Stamp] =
|
||||||
new java.util.HashMap[xsbti.VirtualFileRef, xsbti.compile.analysis.Stamp]
|
new java.util.HashMap[xsbti.VirtualFileRef, xsbti.compile.analysis.Stamp]
|
||||||
def library(fr: xsbti.VirtualFileRef): xsbti.compile.analysis.Stamp = {
|
def library(fr: xsbti.VirtualFileRef): xsbti.compile.analysis.Stamp = backing.library(fr)
|
||||||
val path = converter.toPath(fr)
|
|
||||||
managedCache
|
|
||||||
.getOrElseUpdate(path, sbt.nio.FileStamper.Hash)
|
|
||||||
.map(_.stamp)
|
|
||||||
.getOrElse(backing.library(fr))
|
|
||||||
}
|
|
||||||
def product(fr: xsbti.VirtualFileRef): xsbti.compile.analysis.Stamp = backing.product(fr)
|
def product(fr: xsbti.VirtualFileRef): xsbti.compile.analysis.Stamp = backing.product(fr)
|
||||||
def source(fr: xsbti.VirtualFile): xsbti.compile.analysis.Stamp = {
|
def source(fr: xsbti.VirtualFile): xsbti.compile.analysis.Stamp = {
|
||||||
val path = converter.toPath(fr)
|
val path = converter.toPath(fr)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue