[jboss-jira] [JBoss JIRA] (JGRP-1935) TCP: unneeded copy when receiving single message

Bela Ban (JIRA) issues at jboss.org
Tue Jun 23 08:54:03 EDT 2015


     [ https://issues.jboss.org/browse/JGRP-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Ban resolved JGRP-1935.
----------------------------
    Resolution: Done


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


More information about the jboss-jira mailing list