Robbie Gemmell created PROTON-857:
-------------------------------------

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


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)

Reply via email to