-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More performance improvements #8993
Conversation
# Conflicts: # http-netty/src/main/java/io/micronaut/http/netty/NettyHttpHeaders.java
i don't think this actually changes perf any but it's still a reasonable change
The map is overkill for this particular case (compared to ConcurrentHashMap) but I think we can use it elsewhere too.
We might want to check all of the concurrent instances we use |
fwiw ConcurrentHashMap with a concurrency level of 1 (like in the benchmark) is very close in read perf compared to this new map, and it doesn't have the problem of being very inefficient to populate. so it may be a good choice for some other places like the conversion service. aiui, concurrencyLevel of 1 makes reads faster but concurrent writes slower. |
oh i just realized concurrency level is 1 by default anyway :) so no improvement possible in that area. |
SonarCloud Quality Gate failed. |
New changes from the last PR start at the merge commit.
Only big change is the introduction of a copy on write map, based on HashMap. It's slightly faster than ConcurrentHashMap for reading. I think it will be useful elsewhere too.