apache / apache/pekko

Optimize the Current ConcurrentHashMap usage

Open
#588 4 comments 1 reaction 0 assignees View on GitHub
performance
Dominant language
Scala
Stars
1.6k
Forks
211
Avg merge
1d 6h
Merged PRs (30d)
89

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.