Bela Ban created JGRP-1935:
------------------------------
Summary: TCP: unneeded copy when receiving single message
Key: JGRP-1935
URL:
https://issues.jboss.org/browse/JGRP-1935
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.6.4
In {{TCPConnectionMap$TCPConnection$Receiver}}, we create a new byte[] buffer for each
received message, based on the length sent before the message.
This buffer is subsequently passed to {{BasicTCP}} which calls {{TP.receive()}}.
{{TP.receive()}} makes a copy of the buffer if it is a single message (batches are
deserialized in the same thread), before passing the copy to one the thread pools to get
deserialized and processed.
This is an unneeded copy.
SOLUTION: add a flag {{needs_copy}} to the {{TP.receive()}} call and don't copy if
true.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)