Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-18069

Eliminate unnecessary buffer copy when writing an object with known size via ProtoStream

XMLWordPrintable

      WildFly uses:

      TagWriterImpl.newInstance(context, output, size)
      

      to create the ProtoStream writer when the marshaller is able to compute the buffer size of the target object. However, this still requires a separate buffer, in the event that the actual size is larger or smaller than the buffer size. However, with ProtoStream, all compute sizes are precise, therefore this buffer copy is completely redundant.

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: