You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robert Greig (JIRA)" <qp...@incubator.apache.org> on 2007/01/10 09:48:27 UTC

[jira] Resolved: (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 ]

Robert Greig resolved QPID-268.
-------------------------------

       Resolution: Fixed
    Fix Version/s: M2

Commited to svn rev 494650

> [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
>             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.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira