[ https://issues.apache.org/jira/browse/ARTEMIS-2170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16691706#comment-16691706 ]
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_r234622321 --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java --- @@ -803,139 +799,122 @@ public CoreMessage setDurable(boolean durable) { @Override public CoreMessage putBooleanProperty(final String key, final boolean value) { messageChanged(); - checkProperties(); - properties.putBooleanProperty(SimpleString.toSimpleString(key, getPropertyKeysPool()), value); + getOrCreateProperties().putBooleanProperty(key(key), value); return this; } @Override public CoreMessage putBooleanProperty(final SimpleString key, final boolean value) { messageChanged(); - checkProperties(); - properties.putBooleanProperty(key, value); + getOrCreateProperties().putBooleanProperty(key, value); return this; } @Override public Boolean getBooleanProperty(final SimpleString key) throws ActiveMQPropertyConversionException { - checkProperties(); - return properties.getBooleanProperty(key); + return getOrCreateProperties().getBooleanProperty(key); } @Override public Boolean getBooleanProperty(final String key) throws ActiveMQPropertyConversionException { - checkProperties(); - return properties.getBooleanProperty(SimpleString.toSimpleString(key, getPropertyKeysPool())); + return getOrCreateProperties().getBooleanProperty(key(key)); --- End diff -- can be delegated as: getBooleanProperty(key(key)) > 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)