[armedbear-devel] SLOW enumeration of scripting engines via JSR 223 interface...

Martin Hepperle Martin.Hepperle at MH-AeroTools.de
Sat Nov 27 17:51:05 UTC 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20101127/d1e2d8cf/attachment.html>


More information about the armedbear-devel mailing list