Moved scriptingEngine.updatePrototypes() invocation to the

beginning of the loop in the run() method.
This commit is contained in:
hns 2002-06-21 15:31:02 +00:00
parent f3e9f21bb3
commit 6bb8d54587

View file

@ -80,6 +80,7 @@ public final class RequestEvaluator implements Runnable {
// long startCheck = System.currentTimeMillis (); // long startCheck = System.currentTimeMillis ();
app.typemgr.checkPrototypes (); app.typemgr.checkPrototypes ();
scriptingEngine.updatePrototypes ();
// System.err.println ("Type check overhead: "+(System.currentTimeMillis ()-startCheck)+" millis"); // System.err.println ("Type check overhead: "+(System.currentTimeMillis ()-startCheck)+" millis");
// object refs to ressolve request path // object refs to ressolve request path
@ -93,8 +94,6 @@ public final class RequestEvaluator implements Runnable {
boolean done = false; boolean done = false;
String error = null; String error = null;
scriptingEngine.updatePrototypes ();
while (!done) { while (!done) {
currentElement = null; currentElement = null;
@ -327,8 +326,6 @@ public final class RequestEvaluator implements Runnable {
globals.put ("res", res); globals.put ("res", res);
globals.put ("app", app); globals.put ("app", app);
scriptingEngine.updatePrototypes ();
scriptingEngine.enterContext (globals); scriptingEngine.enterContext (globals);
currentElement = root; currentElement = root;
@ -381,8 +378,6 @@ public final class RequestEvaluator implements Runnable {
} }
} }
scriptingEngine.updatePrototypes ();
// avoid going into transaction if called function doesn't exist // avoid going into transaction if called function doesn't exist
boolean functionexists = true; boolean functionexists = true;
functionexists = scriptingEngine.hasFunction (thisObject, method); functionexists = scriptingEngine.hasFunction (thisObject, method);