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/03/22 22:27:00 UTC

[jira] [Commented] (PROTON-1808) [proton-j] FrameWriter allocates additional buffer capacity inefficiently

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

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

Commit 02d6fd818b08a11b4383b190a02aca635cde045d 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=02d6fd8 ]

PROTON-1808 Grow the buffer by the needed amount when known

For the case where we know how much capacity we need we should grow the
buffer directly and not spin trying to get to an amount that
accommodates what we need.

> [proton-j] FrameWriter allocates additional buffer capacity inefficiently
> -------------------------------------------------------------------------
>
>                 Key: PROTON-1808
>                 URL: https://issues.apache.org/jira/browse/PROTON-1808
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-j
>    Affects Versions: proton-j-0.26.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: proton-j-0.27.0
>
>
> When writing a Transfer that has a larger payload than previously seen the FrameWriter may need to grow its internal buffer to accommodate that transfer.  The current strategy is to double the capacity of the current buffer and copy the old bytes into the new buffer and then check again if there is room.  Depending on the frame size setting and the size of the transfer this can result in a large amount of garbage being created and a number of unneeded copies of encoded performative data. 



--
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