You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Marius-Andrei Danila (JIRA)" <ji...@apache.org> on 2014/06/03 18:09:01 UTC
[jira] [Created] (SLING-3635) [Javascript] Optimization level for
byte code generator in Rhino should be configurable
Marius-Andrei Danila created SLING-3635:
-------------------------------------------
Summary: [Javascript] Optimization level for byte code generator in Rhino should be configurable
Key: SLING-3635
URL: https://issues.apache.org/jira/browse/SLING-3635
Project: Sling
Issue Type: Improvement
Components: Scripting
Affects Versions: Scripting JavaScript 2.0.12
Reporter: Marius-Andrei Danila
The Rhino Javascript engine allows you to choose the level of optimization for the generated byte code or it lets you select whether the scripts should be run in interpreted mode [0].
Currently, there is no way to configure this. By default, Rhino compiles scripts into JVM classes using the optimization level 0.
This option should be configurable, and the default value for this configuration should be "-1" - meaning run scripts in interpreted mode. Since we are not caching script compilation artifacts, the interpreted mode gives the best performance for short-running scripts.
The attached patch implements this improvement by exposing a configuration entry in the Rhino Javascript engine factory component.
[0] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Optimization
--
This message was sent by Atlassian JIRA
(v6.2#6252)