You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2023/08/25 03:20:12 UTC

[GitHub] [incubator-pekko] He-Pin opened a new issue, #588: Optimize the Current ConcurrentHashMap usage

He-Pin opened a new issue, #588:
URL: https://github.com/apache/incubator-pekko/issues/588

   The `ConcurrentHashMap` on Java 8 have some performance issue around the `computeIfAbsent`.
   see https://bugs.openjdk.org/browse/JDK-8161372 , which fixed in Java 9.
   
   A quick fix should be do a quick `get` first.
   
   eg: https://github.com/apache/dubbo/blob/2a5b437d58ba60cd51d39a040b6d39c8697f9d50/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConcurrentHashMapUtils.java#L28
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] mdedetrich commented on issue #588: Optimize the Current ConcurrentHashMap usage

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on issue #588:
URL: https://github.com/apache/incubator-pekko/issues/588#issuecomment-1692938480

   Im okay with this as long as serious testing is done both to see we don't cause issues wrt concurrency and we confirm its faster


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on issue #588: Optimize the Current ConcurrentHashMap usage

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on issue #588:
URL: https://github.com/apache/incubator-pekko/issues/588#issuecomment-1692936613

   Caffeine does the same trick, and which was fixed in Java 9,


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on issue #588: Optimize the Current ConcurrentHashMap usage

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on issue #588:
URL: https://github.com/apache/incubator-pekko/issues/588#issuecomment-1694174980

   This will bring some performance optimization for where read happens most the time. One want to contributes this can do it with jmh benchmark.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] pjfanning commented on issue #588: Optimize the Current ConcurrentHashMap usage

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #588:
URL: https://github.com/apache/incubator-pekko/issues/588#issuecomment-1692921885

   I don't think we should do this. For me, we need proof that this is a big issue before doing anything. That Dubbo change doesn't even look correct to me. The hack to split the computeIfAbsent call over multiple calls changes the way the code works. We should look at how other teams work around this issue and not just copy the solution from one team.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org