Andrew Stitcher created PROTON-2958:
---------------------------------------

             Summary: Implement small AMQP encodings for list/maps/arrays in 
pn_data_t encoder
                 Key: PROTON-2958
                 URL: https://issues.apache.org/jira/browse/PROTON-2958
             Project: Qpid Proton
          Issue Type: Improvement
          Components: proton-c
    Affects Versions: proton-c-0.40.0
            Reporter: Andrew Stitcher
            Assignee: Andrew Stitcher
             Fix For: proton-c-0.41.0


For very small compound structures using the small encodings can save a large 
percentage of on the wire bytes (6 bytes), and for larger ones it's not 
insignificant.

The simplest implementation would be to detect the small encoding is allowed at 
the point we go back and fill in the size. Then shift the content bytes back 6 
bytes if allowed before filling in the size and maybe fixing up the count. 
Since the maximum number of bytes to shift is 255 the cost would not be too 
high.

A major limitation of this approach is that arrays have to contain identical 
typecodes so we assume that everything in one cannot be shortened to avoid a 
mix of typecodes.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to