File tree 1 file changed +12
-1
lines changed
src/org/klesun/deep_js_completion/contexts
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ case class FuncCtx(
23
23
closurePsi : Option [JSFunction ] = None ,
24
24
closureCtx : Option [IFuncCtx ] = None ,
25
25
) extends IFuncCtx {
26
+ var hashCodeField : Option [Int ] = None
26
27
27
28
def getSearch = search
28
29
@@ -73,7 +74,17 @@ case class FuncCtx(
73
74
}
74
75
75
76
override def hashCode (): Int = {
76
- getHashValues().hashCode()
77
+ if (hashCodeField.isEmpty) {
78
+ val startMs = System .currentTimeMillis
79
+ val hashValues = getHashValues()
80
+ val hashCode = hashValues.hashCode()
81
+ val deltaMs = System .currentTimeMillis - startMs
82
+ if (deltaMs > 0 ) {
83
+ Console .println(" hashCode in " + deltaMs + " ms " + hashValues)
84
+ }
85
+ hashCodeField = Some (hashCode)
86
+ }
87
+ hashCodeField.get
77
88
}
78
89
79
90
override def equals (that : Any ): Boolean = {
You can’t perform that action at this time.
0 commit comments