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

Bertrand Delacretaz resolved SLING-3635.
----------------------------------------

    Resolution: Fixed

Thanks for your contribution, I have commited it in 
http://svn.apache.org/r1603776 with a few tweaks in 
http://svn.apache.org/r1603792, please cross-check.


> [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
>            Assignee: Bertrand Delacretaz
>         Attachments: SLING-3635.diff
>
>
> 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)

Reply via email to