qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stitcher (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PROTON-591) There are two large, mostly empty tables used for dispatching incoming frames
Date Tue, 03 Jun 2014 16:25:05 GMT

     [ https://issues.apache.org/jira/browse/PROTON-591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Stitcher updated PROTON-591:
-----------------------------------

    Description: 
The frame dispatch for the raw amqp and sasl layers use a table with 256 entries to lookup
the handling routine for the incoming performative.

There are only 14 different performatives and there is a separate table for the raw amqp and
the sasl layer so there are in total 498 empty table entries and only 14 actual entries.

Currently we don't need to add performatives on the fly so there is no real need for a table
that can be altered as in the current design. We can save a lot of space and somewhat simplify
the code by using a dumb
{code} switch(code) { ...case OPEN: ... break; }; {code} construct for the dispatch.

On a 64 bit machine this saves about 4k per connection and on a 32 bit around 2k per connection
(or only 1k if the SASL layer is disabled)

  was:
The frame dispatch for the raw amqp and sasl layers use a table with 256 entries to lookup
the handling routine for the incoming performative.

There are only 14 different performatives and there is a separate table for the raw amqp and
the sasl layer so there are in total 498 empty table entries and only 14 actual entries.

Currently we don't need to add performatives on the fly so there is no real need for a table
that can be altered as in the current design. We can save a lot of space and somewhat simplify
the code by using a dumb switch...case construct for the dispatch.

On a 64 bit machine this save about 4k per connection and on a 32 bit around 2k per connection
(or only 1k if the SASL layer is disabled)


> There are two large, mostly empty tables used for dispatching incoming frames
> -----------------------------------------------------------------------------
>
>                 Key: PROTON-591
>                 URL: https://issues.apache.org/jira/browse/PROTON-591
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-c
>    Affects Versions: 0.7
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>
> The frame dispatch for the raw amqp and sasl layers use a table with 256 entries to lookup
the handling routine for the incoming performative.
> There are only 14 different performatives and there is a separate table for the raw amqp
and the sasl layer so there are in total 498 empty table entries and only 14 actual entries.
> Currently we don't need to add performatives on the fly so there is no real need for
a table that can be altered as in the current design. We can save a lot of space and somewhat
simplify the code by using a dumb
> {code} switch(code) { ...case OPEN: ... break; }; {code} construct for the dispatch.
> On a 64 bit machine this saves about 4k per connection and on a 32 bit around 2k per
connection (or only 1k if the SASL layer is disabled)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message