Skip to content

Commit

Permalink
Merge pull request #1319 from Friendseeker/zinc-683
Browse files Browse the repository at this point in the history
Do not cache source stamps in `InitialStamps`
  • Loading branch information
eed3si9n authored Apr 8, 2024
2 parents cfd5081 + fcaf3d4 commit af2c920
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,19 +410,17 @@ private class InitialStamps(
import scala.collection.JavaConverters._

// cached stamps for files that do not change during compilation
private val sources: Map[VirtualFileRef, XStamp] = new ConcurrentHashMap().asScala
private val libraries: Map[VirtualFileRef, XStamp] = new ConcurrentHashMap().asScala

override def getAllLibraryStamps: util.Map[VirtualFileRef, XStamp] =
libraries.asJava
override def getAllSourceStamps: util.Map[VirtualFileRef, XStamp] =
sources.asJava
underlying.getAllSourceStamps
override def getAllProductStamps: util.Map[VirtualFileRef, XStamp] =
new util.HashMap()

override def product(prod: VirtualFileRef): XStamp = underlying.product(prod)
override def source(src: VirtualFile): XStamp =
sources.getOrElseUpdate(src, underlying.source(src))
override def source(src: VirtualFile): XStamp = underlying.source(src)
override def library(lib: VirtualFileRef): XStamp =
libraries.getOrElseUpdate(lib, underlying.library(lib))
}
Expand Down

0 comments on commit af2c920

Please sign in to comment.