You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org> on 2007/02/15 17:22:06 UTC

[jira] Assigned: (QPID-268) [Performance] Changes to code generated by code generator for performance improvements

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

Rob Godfrey reassigned QPID-268:
--------------------------------

    Assignee: Rob Godfrey

> [Performance] Changes to code generated by code generator for performance improvements
> --------------------------------------------------------------------------------------
>
>                 Key: QPID-268
>                 URL: https://issues.apache.org/jira/browse/QPID-268
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Common
>            Reporter: Rob Godfrey
>         Assigned To: Rob Godfrey
>             Fix For: M2
>
>         Attachments: qpid-268.patch
>
>
> Testing has shown that we can get not insignificant performance improvements by changing the code generated by the code generator.  
> Firstly we can reduce the overhead of object creation by removing unnecessary string concatenation in using strings for lookups.  That is - no longer use a String representation of the protocol version to do lookups.
> Secondly we can create AMQMethodBody objects with a constructor which takes in the byte buffer, and gets the object to populate itself from this, rather than first creating an empty object and then asking it to populate itself.  The first course of action seems to allow the run-time compiler to optimize-out some aspects of the the object creation.
> Thirdly we can change the way the generated classes ask for their packed bit arrays to be encoded and decoded.  Instead of creating temporary boolean[] objects, we process the packing into byte objects in place.
> The changes also allow further performance improvements to be made later by changing the way objects are looked up in the registries.  For instance, in the MainRegistry the template could now be changed to allow looking up the MethodBody objects in a sparse multi-dimensional array, rather than a Long indexed HashMap.  This can now be done purely by changing the template and without having to change the code generator.
> See attached patch file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.