[
https://issues.apache.org/jira/browse/PROTON-857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507624#comment-14507624
]
ASF subversion and git services commented on PROTON-857:
--------------------------------------------------------
Commit 74e16dfe00f21621e8dbc27cea41ae12ad9a66c7 in qpid-proton's branch
refs/heads/master from Robert Gemmell
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=74e16df ]
PROTON-857: use maps to track handle usage, avoid pre-allocating large arrays
we typically wont utilise fully
Also reduces handle-max to 65535, giving 65536 usable handles like proton-c
currently has.
> reduce memory usage for the TransportSession link handle tracking
> -----------------------------------------------------------------
>
> Key: PROTON-857
> URL: https://issues.apache.org/jira/browse/PROTON-857
> Project: Qpid Proton
> Issue Type: Improvement
> Components: proton-j
> Affects Versions: 0.10
> Reporter: Robbie Gemmell
> Assignee: Robbie Gemmell
> Fix For: 0.10
>
> Attachments:
> 0001-PROTON-857-use-maps-to-track-handle-usage-avoid-pre-.patch
>
>
> The TransportSession class currently maintains two 'maps' of [local|remote]
> handle->TransportLink using arrays of size handle-max + 1 (since we start
> from 0 when using handles, just like array indexes). The handle-max value
> used to be 1024 in proton-j but was recently changed to be 65536 in
> PROTON-844, allowing us to track 65537 handles. This change exposes the
> transports already somewhat inefficient storage of handles by requiring ~64x
> as much memory per open session, which in most cases wont use the extra
> capacity and indeed may often only need to use a single handle at a time (or
> worse, none, if a session isnt actually used for some weird reason).
> The handle tracking should be updated to use a HashMap, in similar fashion to
> how the session channel numbers are tracked by the transport.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)