xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minc...@apache.org
Subject svn commit: r464552 - /xalan/java/trunk/src/org/apache/xalan/processor/XSLTSchema.java
Date Mon, 16 Oct 2006 16:34:44 GMT
Author: minchau
Date: Mon Oct 16 09:34:43 2006
New Revision: 464552

URL: http://svn.apache.org/viewvc?view=rev&rev=464552
Log:
Applying Dave Brosius patch from xalanj-2221 which
changes a loop over i that copies values from one
array to another to a System.arraycopy() that should
run faster.

Modified:
    xalan/java/trunk/src/org/apache/xalan/processor/XSLTSchema.java

Modified: xalan/java/trunk/src/org/apache/xalan/processor/XSLTSchema.java
URL: http://svn.apache.org/viewvc/xalan/java/trunk/src/org/apache/xalan/processor/XSLTSchema.java?view=diff&rev=464552&r1=464551&r2=464552
==============================================================================
--- xalan/java/trunk/src/org/apache/xalan/processor/XSLTSchema.java (original)
+++ xalan/java/trunk/src/org/apache/xalan/processor/XSLTSchema.java Mon Oct 16 09:34:43 2006
@@ -613,19 +613,13 @@
     templateElements[i++] = exsltFunction;
     templateElements[i++] = exsltResult;
 
-    int k;
-
-    for (k = 0; k < i; k++)
-    {
-      templateElementsAndParams[k] = templateElements[k];
-      templateElementsAndSort[k] = templateElements[k];
-      exsltFunctionElements[k]     = templateElements[k];
-
-    }
-
-    templateElementsAndParams[k] = xslParam;
-    templateElementsAndSort[k] = xslSort;
-    exsltFunctionElements[k]   = xslParam;
+    System.arraycopy(templateElements, 0, templateElementsAndParams, 0, i);
+    System.arraycopy(templateElements, 0, templateElementsAndSort, 0, i);
+    System.arraycopy(templateElements, 0, exsltFunctionElements, 0, i);
+    
+    templateElementsAndParams[i] = xslParam;
+    templateElementsAndSort[i] = xslSort;
+    exsltFunctionElements[i]   = xslParam;
 
     i = 0;
     charTemplateElements[i++] = charData;  // #PCDATA



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message