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

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

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

    https://github.com/apache/activemq-artemis/pull/2427#discussion_r232491068
  
    --- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
 ---
    @@ -887,55 +876,48 @@ public CoreMessage putBytesProperty(final String key, 
final byte[] value) {
        @Override
        public CoreMessage putCharProperty(SimpleString key, char value) {
           messageChanged();
    -      checkProperties();
    -      properties.putCharProperty(key, value);
    +      checkProperties().putCharProperty(key, value);
           return this;
        }
     
        @Override
        public CoreMessage putCharProperty(String key, char value) {
           messageChanged();
    -      checkProperties();
    -      properties.putCharProperty(SimpleString.toSimpleString(key, 
getPropertyKeysPool()), value);
    +      checkProperties().putCharProperty(SimpleString.toSimpleString(key, 
getPropertyKeysPool()), value);
    --- End diff --
    
    Delegate to simplestring method variant. Ditto for all cases on this


> 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