Details
-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
Description
When (un)marshalling a message, we process the fields in this order:
- Sender and receiver addresses
- Flags
- Payload
- Headers
I'd like to change this to move processing of the payload to the end because
- If payload refers to a different buffer (
JGRP-1773), then we don't need to read the bytes, but currently have to skip N bytes to read the headers. If the payload was at the end, this wouldn't be needed - Once we use NIO.2 and gathering writes, we'd pass a couple of buffers to the socket write and therefore it's simpler if the payload is written last. Ditto for scattering reads.
Attachments
Issue Links
- relates to
-
JGRP-1773 TP$MyHandler.handleSingleMessage() makes an unnecessary copy of the buffer
- Resolved