Uploaded image for project: 'ProtoStream'
  1. ProtoStream
  2. IPROTO-130

Inefficient ProtobufUtil.fromWrappedByteArray(ImmutableSerializationContext ctx, byte[] bytes)

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • 4.2.6.Final, 4.3.3.Final
    • 4.2.5.Final, 4.3.2.Final
    • None

      The implementation uses a ByteArrayInputStream that wraps the byte[], and then creates a CodedInputStream around it and this copies the input data to its own buffer. This should have been made more efficiently by building a CodedInputStream directly around the byte[] (which internally uses CodedInputStream.ArrayDecoder and doesn't need a buffer copy).

              anistor Adrian Nistor (Inactive)
              anistor Adrian Nistor (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: