You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/10/03 16:02:00 UTC

[jira] [Commented] (PROTON-1948) Refactor FrameWriter to avoid reencodes when buffer space is insufficient

    [ https://issues.apache.org/jira/browse/PROTON-1948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637118#comment-16637118 ] 

ASF subversion and git services commented on PROTON-1948:
---------------------------------------------------------

Commit 1a5e1936944c11bae64244a3223e3be98b2d6d18 in qpid-proton-j's branch refs/heads/master from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton-j.git;h=1a5e193 ]

PROTON-1948 Refactor FrameWriter with more performant buffer

Refactor the FrameWriter to use a more performant ReadableBuffer wrapper
around a byte array that auto grows as an ecode requires instead of
reallocating a ByteBuffer and copying past contents and then performing
a new encode any time space is exhausted.  Removing the layer of buffer
abstractions leads to an increase in overall performance under normal
operations as well.


> Refactor FrameWriter to avoid reencodes when buffer space is insufficient
> -------------------------------------------------------------------------
>
>                 Key: PROTON-1948
>                 URL: https://issues.apache.org/jira/browse/PROTON-1948
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-j
>    Affects Versions: proton-j-0.29.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: proton-j-0.30.0
>
>
> The current FrameWriter implementation uses a ByteBuffer wrapped in a ReadableBuffer to encode to and if the buffer is to small it recreates the buffer with a larger size and must perform a second encode to finish the job.  We can now implement our own ReadableBuffer type for the writer that both performs better by dropping the ByteBuffer abstractions and that grows as needed to fit the encoding of the types and the accompanying payloads (for Transfers).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org