Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use ConcurrentHashMap in EvalCacheMulti
hopefully solves a case of CPU hogging in AnyRefMap.get ``` java.lang.Thread.State: RUNNABLE at scala.collection.mutable.AnyRefMap.seekEntry(AnyRefMap.scala:126) at scala.collection.mutable.AnyRefMap.get(AnyRefMap.scala:151) at lila.ws.evalCache.EvalCacheMulti.unregisterEval(EvalCacheMulti.scala:65) at lila.ws.evalCache.EvalCacheMulti.register$$anonfun$1$$anonfun$1(EvalCacheMulti.scala:33) at lila.ws.evalCache.EvalCacheMulti$$Lambda/0x0000796c44839ba0.applyVoid(Unknown Source) at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) at scala.collection.immutable.List.foreach(List.scala:333) at lila.ws.evalCache.EvalCacheMulti.register$$anonfun$1(EvalCacheMulti.scala:33) at lila.ws.evalCache.EvalCacheMulti$$Lambda/0x0000796c447ffa08.applyVoid(Unknown Source) at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) at scala.Option.foreach(Option.scala:437) at lila.ws.evalCache.EvalCacheMulti.register(EvalCacheMulti.scala:33) at lila.ws.evalCache.EvalCacheApi.getMulti(EvalCacheApi.scala:54) at lila.ws.ClientActor$.globalReceive(ClientActor.scala:115) ``` and ``` java.lang.Thread.State: RUNNABLE at scala.collection.mutable.AnyRefMap.seekEntry(AnyRefMap.scala:126) at scala.collection.mutable.AnyRefMap.get(AnyRefMap.scala:151) at lila.ws.evalCache.EvalCacheMulti.register$$anonfun$2(EvalCacheMulti.scala:37) at lila.ws.evalCache.EvalCacheMulti$$Lambda/0x0000796c44804000.apply(Unknown Source) at scala.collection.immutable.List.foreach(List.scala:333) at lila.ws.evalCache.EvalCacheMulti.register(EvalCacheMulti.scala:37) at lila.ws.evalCache.EvalCacheApi.getMulti(EvalCacheApi.scala:54) at lila.ws.ClientActor$.globalReceive(ClientActor.scala:115) ```
- Loading branch information