Use THashSet for sets that are assumed to be big
Otherwise, a lot of memory is wasted on nodes instances (cherry picked from commit 4922f87)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.kotlin.daemon
|
||||
|
||||
import com.intellij.util.containers.StringInterner
|
||||
import gnu.trove.THashSet
|
||||
import org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade
|
||||
import org.jetbrains.kotlin.daemon.common.DummyProfiler
|
||||
import org.jetbrains.kotlin.daemon.common.Profiler
|
||||
@@ -29,7 +30,7 @@ import org.jetbrains.kotlin.incremental.components.ScopeKind
|
||||
class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, eventManager: EventManager, val profiler: Profiler = DummyProfiler()) : LookupTracker {
|
||||
private val isDoNothing = profiler.withMeasure(this) { facade.lookupTracker_isDoNothing() }
|
||||
|
||||
private val lookups = hashSetOf<LookupInfo>()
|
||||
private val lookups = THashSet<LookupInfo>()
|
||||
private val interner = StringInterner()
|
||||
|
||||
override val requiresPosition: Boolean = profiler.withMeasure(this) { facade.lookupTracker_requiresPosition() }
|
||||
|
||||
Reference in New Issue
Block a user