You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/05/08 11:01:23 UTC

[jira] [Resolved] (CAMEL-6340) Improve Groovy performance

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

Claus Ibsen resolved CAMEL-6340.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.12.0
                   2.11.1
                   2.10.5

Thanks for the patch.
                
> Improve Groovy performance
> --------------------------
>
>                 Key: CAMEL-6340
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6340
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-groovy
>    Affects Versions: 2.10.3
>            Reporter: Antoine DESSAIGNE
>            Assignee: Claus Ibsen
>              Labels: patch, perfomance
>             Fix For: 2.10.5, 2.11.1, 2.12.0
>
>         Attachments: groovy_performance.patch
>
>
> We noticed some performance issues with the execution of Groovy expression. In the {{GroovyExpression}} the script is parsed 2 times at each evaluation. You'll find attached a patch that caches the parsed-version of the scripts.
> We did some performance tests with the following definition:
> {noformat}
> from("direct:start")
>     .loop(10000)
>     .setBody(new GroovyExpression("request.body + request.getHeader('CamelLoopIndex')"))
>     .to("mock:ignore");
> {noformat}
> We took the average of 5 executions (without the first one):
> || use case || duration ||
> | default, no cache | 52690ms |
> | patched, with cache | 1017ms |
> It's more than 50 times faster which is always nice to have

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira