You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/19 16:12:01 UTC
[jira] [Commented] (ARTEMIS-1816) OpenWire should avoid
ByteArrayOutputStream lazy allocation
[ https://issues.apache.org/jira/browse/ARTEMIS-1816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444316#comment-16444316 ]
ASF GitHub Bot commented on ARTEMIS-1816:
-----------------------------------------
GitHub user franz1981 opened a pull request:
https://github.com/apache/activemq-artemis/pull/2031
ARTEMIS-1816 OpenWire should avoid ByteArrayOutputStream lazy allocation
OpenWireMessageConverter::toAMQMessage on bytes messages is lazy
allocating a write buffer with a default size of 1024 even when
it won't be used to write anything.
It avoid an useless allocation by reducing it to new byte[0].
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/franz1981/activemq-artemis ARTEMIS-1816
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/2031.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2031
----
commit a391704c54d1d73e0dcc57e5c71a384e6299e3cd
Author: Francesco Nigro <ni...@...>
Date: 2018-04-19T15:46:26Z
ARTEMIS-1816 OpenWire should avoid ByteArrayOutputStream lazy allocation
OpenWireMessageConverter::toAMQMessage on bytes messages is lazy
allocating a write buffer with a default size of 1024 even when
it won't be used to write anything.
It avoid an useless allocation by reducing it to new byte[0].
----
> OpenWire should avoid ByteArrayOutputStream lazy allocation
> -----------------------------------------------------------
>
> Key: ARTEMIS-1816
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1816
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker, OpenWire
> Affects Versions: 2.5.0
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Minor
>
> OpenWireMessageConverter::toAMQMessage on bytes messages is lazy allocating a write buffer with a default size of 1024 even when it won't be used to write anything.
> To avoid an useless allocation would be better to reduce it to a zero length one.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)