Open
Description
This is to improve the decode performance of small messages (<16 KB) to avoid a message-sized allocation and copy.
Protobuf already has an optimized code path for decoding a direct ByteBuffer
. We currently copy to a byte[]
, but that could be avoided because small messages will commonly be in a single ByteBuffer
.
This will require adding a new interface for retrieving the ByteBuffer
from the InputStream
. I'm uncertain whether the interface should support returning multiple ByteBuffer
s.