[
https://issues.apache.org/jira/browse/ARTEMIS-2990?focusedWorklogId=515456&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-515456
]
ASF GitHub Bot logged work on ARTEMIS-2990:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 23/Nov/20 10:34
Start Date: 23/Nov/20 10:34
Worklog Time Spent: 10m
Work Description: gtully commented on a change in pull request #3352:
URL: https://github.com/apache/activemq-artemis/pull/3352#discussion_r528605747
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/WildcardAddressManager.java
##########
@@ -175,36 +175,38 @@ public void clear() {
wildCardAddresses.clear();
}
- private Address addAndUpdateAddressMap(final SimpleString address, boolean
getBiased) {
+ private Address addAndUpdateAddressMap(final SimpleString address) {
final boolean containsWildCard =
address.containsEitherOf(wildcardConfiguration.getAnyWords(),
wildcardConfiguration.getSingleWord());
final Map<SimpleString, Address> addressMap = containsWildCard ?
wildCardAddresses : addresses;
- Address actualAddress = null;
- if (getBiased) {
- // CHM::get doesn't need to synchronize anything, so it's to be
preferred for getBiased cases
- actualAddress = addressMap.get(address);
- }
+ Address actualAddress = addressMap.get(address);
if (actualAddress == null) {
Review comment:
I looked at changing this, if I follow the same pattern on the get check
inside the sync I end up with a method with 3 return statements. At the moment
it has a single return, which i like.
I thin the single return statement is better than 2 fast paths and one slow
:-)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 515456)
Time Spent: 8h (was: 7h 50m)
> optimise performance of wildcard address manager
> ------------------------------------------------
>
> Key: ARTEMIS-2990
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2990
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 2.16.0
> Reporter: Gary Tully
> Assignee: Gary Tully
> Priority: Major
> Time Spent: 8h
> Remaining Estimate: 0h
>
> A scenario test with lots of short lived concurrent wildcard subs
> demonstrates some bottlenecks in the wildcard address and binding manager.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)