Do lazy initialization of scripting engine. If immediate creation is desired, calling code can do this by invoking the iniitScriptingEngine() method.
This commit is contained in:
parent
c591ab2e7d
commit
36b7ce8221
1 changed files with 6 additions and 2 deletions
|
@ -23,7 +23,7 @@ public final class RequestEvaluator implements Runnable {
|
||||||
|
|
||||||
public final Application app;
|
public final Application app;
|
||||||
|
|
||||||
protected final ScriptingEngine scriptingEngine;
|
private ScriptingEngine scriptingEngine;
|
||||||
|
|
||||||
public RequestTrans req;
|
public RequestTrans req;
|
||||||
public ResponseTrans res;
|
public ResponseTrans res;
|
||||||
|
@ -65,9 +65,12 @@ public final class RequestEvaluator implements Runnable {
|
||||||
*/
|
*/
|
||||||
public RequestEvaluator (Application app) {
|
public RequestEvaluator (Application app) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
scriptingEngine = helma.scripting.fesi.FesiEngineFactory.getEngine (app, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initScriptingEngine () {
|
||||||
|
if (scriptingEngine == null)
|
||||||
|
scriptingEngine = helma.scripting.fesi.FesiEngineFactory.getEngine (app, this);
|
||||||
|
}
|
||||||
|
|
||||||
public void run () {
|
public void run () {
|
||||||
|
|
||||||
|
@ -81,6 +84,7 @@ public final class RequestEvaluator implements Runnable {
|
||||||
|
|
||||||
// long startCheck = System.currentTimeMillis ();
|
// long startCheck = System.currentTimeMillis ();
|
||||||
app.typemgr.checkPrototypes ();
|
app.typemgr.checkPrototypes ();
|
||||||
|
initScriptingEngine ();
|
||||||
scriptingEngine.updatePrototypes ();
|
scriptingEngine.updatePrototypes ();
|
||||||
// System.err.println ("Type check overhead: "+(System.currentTimeMillis ()-startCheck)+" millis");
|
// System.err.println ("Type check overhead: "+(System.currentTimeMillis ()-startCheck)+" millis");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue