You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2006/04/24 08:25:50 UTC

svn commit: r396450 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java status.xml

Author: antonio
Date: Sun Apr 23 23:25:48 2006
New Revision: 396450

URL: http://svn.apache.org/viewcvs?rev=396450&view=rev
Log:

<action dev="AG" type="fix" fixes-bug="COCOON-1721" due-to="Georg Hüttenegger" due-to-email="georg.huettenegger@gmx.at">
  Performance Issue/JavaScriptFlowScript: If &lt;reload-scripts&gt; is set to false,
  do not check for last modification time of javascript source files.
</action>

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
    cocoon/branches/BRANCH_2_1_X/status.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java?rev=396450&r1=396449&r2=396450&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java Sun Apr 23 23:25:48 2006
@@ -110,7 +110,7 @@
             if (refresh) {
                 source.refresh();
             }
-            if (script == null || compileTime < source.getLastModified()) {
+            if (script == null || (refresh && compileTime < source.getLastModified())) {
                 script = interpreter.compileScript(context, scope, source);
                 compileTime = source.getLastModified();
             }

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java?rev=396450&r1=396449&r2=396450&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java Sun Apr 23 23:25:48 2006
@@ -605,7 +605,10 @@
                 String sourceURI = (String) execList.get(i);
                 ScriptSourceEntry entry =
                     (ScriptSourceEntry) compiledScripts.get(sourceURI);
-                long lastMod = entry.getSource().getLastModified();
+                long lastMod = 0;
+                if (reloadScripts && lastExecTime != 0) {
+                    lastMod = entry.getSource().getLastModified();
+                }
                 Script script = entry.getScript(context, this.scope, false, this);
                 if (lastExecTime == 0 || lastMod > lastExecTime) {
                     script.exec(context, thrScope);

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=396450&r1=396449&r2=396450&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Sun Apr 23 23:25:48 2006
@@ -182,6 +182,10 @@
   <release version="@version@" date="@date@">
 -->
   <release version="2.1.10" date="TBD">
+    <action dev="AG" type="fix" fixes-bug="COCOON-1721" due-to="Georg Hüttenegger" due-to-email="georg.huettenegger@gmx.at">
+      Performance Issue/JavaScriptFlowScript: If &lt;reload-scripts&gt; is set to false,
+      don't check for last modification time of javascript source files. 
+    </action>
     <action dev="AN" type="fix">
       XSP block: Fix regression introduced in 2.1.8 that under specific circumstances logicsheets
       were not applied, leading to compilation errors.  This manifested itself only if