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

TCP: unneeded copy when receiving single message

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: