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

Remove temporary buffers when marshalling objects

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 4.4.2.Final
    • None
    • None
    • False
    • False
    • None

    Description

      When marshaling object (nested too), most of the code has the following pattern

      ByteArrayOutputStreamEx buffer = new ByteArrayOutputStreamEx();
      TagWriterImpl nestedCtx = TagWriterImpl.newInstance(ctx, buffer);
      marshallerDelegate.marshall(nestedCtx, null, t);
      

      The TagWriterImpl class has an internal byte[] to minimize the invocations in the OutputStream. But, in the scenario above, there is no penailty to invoke the ByteArrayOutputStreamEx multiple times.

      Attachments

        Issue Links

          Activity

            People

              pruivo@redhat.com Pedro Ruivo
              pruivo@redhat.com Pedro Ruivo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: