Martin Lichtin created AMQ-6933:
-----------------------------------
Summary: Re-use buffer in DataByteArrayOutputStream.restart() to
avoid unnecessary GC
Key: AMQ-6933
URL: https://issues.apache.org/jira/browse/AMQ-6933
Project: ActiveMQ
Issue Type: Improvement
Reporter: Martin Lichtin
Re-use buffer in DataByteArrayOutputStream.restart(int size) to avoid
unnecessary GC.
The buf[] array only needs to be reallocated in case the requested size is
larger than the existing buffer size.
{noformat}
Stack Trace TLABs Total TLAB Size(bytes) Pressure(%)
org.apache.activemq.util.DataByteArrayOutputStream.restart(int) 1'398
516'041'504 9.413
org.apache.activemq.util.DataByteArrayOutputStream.restart() 1'398
516'041'504 9.413
org.apache.activemq.openwire.OpenWireFormat.marshal(Object, DataOutput)
1'398 516'041'504 9.413
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)