Hi,
embedding ABCL using JSR 223 scripting interface I see an nnoyingly long startup time for instances of the ScriptEngineFactory. This is annoying, as e.g. just enumerating all available scrip engines takes rather long because ABCL peforms its complete initailization when I only want to see what its name and script file extensions are.
In the class AbclScriptEngineFactory there is a static field which holds a singleeton instance of the script engine: private static final AbclScriptEngine THE_ONLY_ONE_ENGINE = new AbclScriptEngine();
This field is unneccesarily instantiated as soon as the class AbclScriptEngineFactory is instantiated.
It would be preferred to intantiate the cript engine only when actually needed, i.e. in getScriptEngine() and instead set it to null so that THE_ONLY_ONE_ENGINE can be tested agianst null inside getScriptEngine().
Thank You,
Martin
On 27 November 2010 19:51, Martin Hepperle Martin.Hepperle@mh-aerotools.de wrote:
Hi, embedding ABCL using JSR 223 scripting interface I see an nnoyingly long startup time for instances of the ScriptEngineFactory. This is annoying, as e.g. just enumerating all available scrip engines takes rather long because ABCL peforms its complete initailization when I only want to see what its name and script file extensions are. In the class AbclScriptEngineFactory there is a static field which holds a singleeton instance of the script engine: private static final AbclScriptEngine THE_ONLY_ONE_ENGINE = new AbclScriptEngine(); This field is unneccesarily instantiated as soon as the class AbclScriptEngineFactory is instantiated. It would be preferred to intantiate the cript engine only when actually needed, i.e. in getScriptEngine() and instead set it to null so that THE_ONLY_ONE_ENGINE can be tested agianst null inside getScriptEngine().
First of all, thanks for the report! Fix committed on trunk as r13059. We will try and backport it for 0.23.1.
Just out of curiosity, what are you using JSR-223 for? Some of us abcl maintainers believe it's one of our greatest features, we've been looking for users for it. :)
On 27 November 2010 23:10, Ville Voutilainen ville.voutilainen@gmail.com wrote:
First of all, thanks for the report! Fix committed on trunk as r13059. We will try and backport it for 0.23.1.
r13060 makes the getter also synchronized. The fixes will be in 0.23.1, I backported them already. Again, thank you very much for the bug report!
armedbear-devel@common-lisp.net