camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sami Nurminen (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-8529) ScriptEngine usage optimizations
Date Mon, 12 Jun 2017 18:24:00 GMT

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

Sami Nurminen edited comment on CAMEL-8529 at 6/12/17 6:23 PM:
---------------------------------------------------------------

There seems to be camel context property REUSE_SCRIPT_ENGINE used in  org.apache.camel.builder.script.ScriptBuilder
which seems to be undocumented? Maybe it could be exposed somehow, for example same way as
"cacheScript" option in the language component eg. reuseScriptEngine true/false. At least
in my machine javascript didn't have any concurrence issues with simple test copied from RubyScriptTextTest.
Or maybe a little pool of script engines.


was (Author: snurmine):
There seems to be camel context property REUSE_SCRIPT_ENGINE used in  org.apache.camel.builder.script.ScriptBuilder
which seems to be undocumented? Maybe it could be exposed somehow, for example same way as
"cacheScript" option in the language component eg. reuseScriptEngine true/false. At least
in my machine javascript didn't have any concurrence issues with simple test copied from RubyScriptTextTest.


> ScriptEngine usage optimizations
> --------------------------------
>
>                 Key: CAMEL-8529
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8529
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-script
>    Affects Versions: 2.15.0
>            Reporter: gui
>            Assignee: Willem Jiang
>         Attachments: scriptbuilder.patch
>
>
> When a script is compiled (eg in case of js), the scriptbuilder is (re) creating a new
engine instance on every invocation, although the compiled script has already an engine attached.

> This cause a lot of unnecessary engine initialization on every invocation. 



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

Mime
View raw message