mirror of https://github.com/sbt/sbt.git
avoid force gc during load
This initializes the lastGcCheck to the current time so it won't force GC in the first 10 minutes, avoiding unnecessary GC during load.
This commit is contained in:
parent
cd00d0f801
commit
fcd9dbf3dd
|
|
@ -18,7 +18,7 @@ private[sbt] object GCUtil {
|
|||
// as specified by system properties.
|
||||
val defaultForceGarbageCollection: Boolean = true
|
||||
val defaultMinForcegcInterval: Duration = 10.minutes
|
||||
val lastGcCheck: AtomicLong = new AtomicLong(0L)
|
||||
val lastGcCheck: AtomicLong = new AtomicLong(System.currentTimeMillis)
|
||||
|
||||
def forceGcWithInterval(minForcegcInterval: Duration, log: Logger): Unit = {
|
||||
val now = System.currentTimeMillis
|
||||
|
|
|
|||
Loading…
Reference in New Issue