Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-591

There are two large, mostly empty tables used for dispatching incoming frames

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.7
    • proton-0.8
    • proton-c
    • None

    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

       switch(code) { ...case OPEN: ... break; }; 

      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)

      Attachments

        Activity

          People

            astitcher Andrew Stitcher
            astitcher Andrew Stitcher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: