From 729f20ed81c85357a4714a981ffa65024b7817f9 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Mon, 22 May 2017 11:57:24 +0300 Subject: [PATCH] Reduce memory size retained by LookupTrackerImpl By default SmartList is used there for storing values of a multimap, so a lot of duplicated items is stored there (file names are being duplicated). Even although there is a separate interner for these values, retained memory size has been reduced for 30M when compiling `idea` module in Kotlin project --- .../src/org/jetbrains/kotlin/incremental/LookupStorage.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-common/src/org/jetbrains/kotlin/incremental/LookupStorage.kt b/build-common/src/org/jetbrains/kotlin/incremental/LookupStorage.kt index af8837847f7..42b33870c4e 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/LookupStorage.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/LookupStorage.kt @@ -197,7 +197,7 @@ open class LookupStorage(private val targetDataDir: File) : BasicMapsOwner() { } class LookupTrackerImpl(private val delegate: LookupTracker) : LookupTracker { - val lookups = MultiMap() + val lookups = MultiMap.createSet() val pathInterner = StringInterner() private val interner = StringInterner()