[ 
https://issues.apache.org/jira/browse/ARTEMIS-2170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683365#comment-16683365
 ] 

ASF GitHub Bot commented on ARTEMIS-2170:
-----------------------------------------

Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2427#discussion_r232560925
  
    --- Diff: 
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java
 ---
    @@ -318,6 +320,33 @@ public synchronized boolean containsProperty(final 
SimpleString key) {
           }
        }
     
    +   public synchronized boolean 
cleanupInternalProperties(Predicate<SimpleString> propertyNamePredicate) {
    +      if (!internalProperties) {
    --- End diff --
    
    I agree: in that case I would move the other `Message`ish things outside 
`TypedProperties`.
    I was hoping for a less impactfull change TBH, but you really got a point 
about this. Let me check if I can perform a surgical removal to make the code 
simpler and cleaner :+1: 


> Optimized CoreMessage's checkProperties and cleanupInternalProperties methods
> -----------------------------------------------------------------------------
>
>                 Key: ARTEMIS-2170
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2170
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>            Priority: Minor
>
> CoreMessage::checkProperties perform too many volatile read/write and has a 
> too big body just to handle exceptional cases, while 
> cleanupInternalProperties is called on the hot path of session send, but is 
> performing too many synchronized operations and loopup on TypedProperties.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to