camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11484) Optimise - Simple Language / ExpressionBuilder can use cache of frequent used expressions
Date Thu, 29 Jun 2017 20:34:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068937#comment-16068937
] 

Claus Ibsen commented on CAMEL-11484:
-------------------------------------

This only applies to more complex simple languages with nested functions, which would cause
being evaluated per exchange, which then would create a new simple expression, that was not
cached/reused. For example to call a random function where the max value is a nested simple
expression
{code}
${random(1,${header.max})}
{code}

Then at runtime, header.max is created as a new simple expression each time. By using the
cache we can avoid this overhead. 

> Optimise - Simple Language / ExpressionBuilder can use cache of frequent used expressions
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-11484
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11484
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.20.0
>
>
> If you use a simple expression in a Camel route that has a simple token, then it's re-created
per exchange during routing. The expression by itself can be cached and reused, which avoids
using the simple parser over and over again.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message