You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a minor improvement. I believe we can have the caches created in ExtractAPI created and destroyed per run, to alleviate memory consumption on every compile. This is just a nicety, it can wait.
The text was updated successfully, but these errors were encountered:
The goal of this ticket is to alleviate memory consumption of Scala's incremental compiler phases. It is not clear whether this is possible, so some small "research" by the user that takes this up will be required.
The idea is to go to ExtractAPI.scala and make the following maps and sets user perRunCaches, defined in the Scala compiler.
Maps and sets to migrate:
// this cache reduces duplicate work both here and when persisting
// caches on other structures had minimal effect on time and cache size
// (tried: Definition, Modifier, Path, Id, String)
private[this] val typeCache = new HashMap[(Symbol, Type), xsbti.api.Type]
// these caches are necessary for correctness
private[this] val structureCache = new HashMap[Symbol, xsbti.api.Structure]
private[this] val classLikeCache = new HashMap[(Symbol, Symbol), xsbti.api.ClassLikeDef]
private[this] val pending = new HashSet[xsbti.api.Lazy[_]]
private[this] val emptyStringArray = new Array[String](0)
private[this] val allNonLocalClassesInSrc = new HashSet[xsbti.api.ClassLike]
private[this] val _mainClasses = new HashSet[String]
So your task is to define maps and sets using perRunCaches, see if there are problems and identify if these caches are forced to be persisted across all the compiler runs. This may scare you! But don't worry, it's simpler than it looks like. Have fun!
This is a minor improvement. I believe we can have the caches created in
ExtractAPI
created and destroyed per run, to alleviate memory consumption on every compile. This is just a nicety, it can wait.The text was updated successfully, but these errors were encountered: