-
Bug
-
Resolution: Done
-
Major
-
4.2.5.Final, 4.3.2.Final
-
None
ProtobufUtil.fromWrappedByteArray wraps the bytep[] in a ByteArrayInputStream and uses that as an input for CodedInputStream. But that is inefficient, because CodedInputStream.StreamDecoder needs to allocate a buffer and copy from the stream into the buffer before processing.
Instead we can pass the byte[] directly to CodedInputStream and use CodedInputStream.ArrayDecoder, which doesn't need a buffer.
- is duplicated by
-
IPROTO-130 Inefficient ProtobufUtil.fromWrappedByteArray(ImmutableSerializationContext ctx, byte[] bytes)
- Closed