michaelandrepearce commented on a change in pull request #3370:
URL: https://github.com/apache/activemq-artemis/pull/3370#discussion_r578785892



##########
File path: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
##########
@@ -426,7 +426,6 @@ protected CoreMessage(CoreMessage other, TypedProperties 
copyProperties) {
       // with getEncodedBuffer(), otherwise can introduce race condition when 
delivering concurrently to
       // many subscriptions and bridging to other nodes in a cluster
       synchronized (other) {
-         this.body = other.body;

Review comment:
       I might be a plank, but surely this avoids using up memory as the body 
object is copied by reference here, rather than later needing to deserialise 
again and creating a new object in memory.




----------------------------------------------------------------
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]


Reply via email to