WJL3333 opened a new issue #3375:
URL: https://github.com/apache/rocketmq/issues/3375


   1. Please describe the issue you observed:
   
   Avoid unnecessary object allocation when getMessage.
   
   GetMessageResult will create double ArrayList with 100 initialCapacity.
   the pullBatchSize in consumer is 32 which means in default config. then 100 
initialCapacity is unnecessary.
   
   And when message not found. the allocation is also can be avoided.
   
   see
   
https://github.com/apache/rocketmq/blob/773ae4ae38c279abd69a5aa061c269d3a190a86b/store/src/main/java/org/apache/rocketmq/store/GetMessageResult.java#L26
   
   
https://github.com/apache/rocketmq/blob/773ae4ae38c279abd69a5aa061c269d3a190a86b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java#L549
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to