camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine DESSAIGNE (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-6340) Improve Groovy performance
Date Tue, 07 May 2013 12:33:15 GMT
Antoine DESSAIGNE created CAMEL-6340:
----------------------------------------

             Summary: 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


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

Mime
View raw message