Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1935

TCP: unneeded copy when receiving single message

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 3.6.4
    • None
    • None

      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.

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: