[
http://jira.jboss.com/jira/browse/JGRP-517?page=comments#action_12363267 ]
Bela Ban commented on JGRP-517:
-------------------------------
I had this before, and called reset() on the output stream. However, if we for example
send a larger message (say 60K), then we end up with a 60K buffer allocated even though it
may not be used later on as we're sending smaller messages. Performance wise, both
solutions were the same.
TP.send() creates a new ByteArrayOutputStream for every message
---------------------------------------------------------------
Key: JGRP-517
URL:
http://jira.jboss.com/jira/browse/JGRP-517
Project: JGroups
Issue Type: Bug
Reporter: Michael Newcomb
Assigned To: Bela Ban
Every call to TP.send() results in a new ByteArrayOutputStream being created. This
creates a large amount of garbage. Could TP.send() use a pool of ByteArrayOutputStreams or
something to cut down on generated garbage?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira