Author: nick
Date: Wed Dec 12 00:48:13 2012
New Revision: 1420501

URL: http://svn.apache.org/viewvc?rev=1420501&view=rev
Log:
Patch from Jan from bug #54282 - Improve the performance of ColumnHelper 
addCleanColIntoCols, speeds up some .xlsx file loading

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1420501&r1=1420500&r2=1420501&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Wed Dec 12 00:48:13 
2012
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="4.0-beta1" date="2013-??-??">
+          <action dev="poi-developers" type="fix">54282 - Improve the 
performance of ColumnHelper addCleanColIntoCols, speeds up some .xlsx file 
loading</action>
           <action dev="poi-developers" type="fix">53650 - Prevent unreadable 
content and disalow to overwrite rows from input template in SXSSF</action>
           <action dev="poi-developers" type="fix">54228,53672 - Fixed XSSF to 
read cells with missing R attribute</action>
           <action dev="poi-developers" type="fix">54206 - Ensure that shared 
formuals are updated when shifting rows in a spreadsheet</action>

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java?rev=1420501&r1=1420500&r2=1420501&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
 Wed Dec 12 00:48:13 2012
@@ -112,7 +112,8 @@ public class ColumnHelper {
 
     public CTCols addCleanColIntoCols(CTCols cols, CTCol col) {
         boolean colOverlaps = false;
-        for (int i = 0; i < cols.sizeOfColArray(); i++) {
+        int sizeOfColArray = cols.sizeOfColArray();
+        for (int i = 0; i < sizeOfColArray; i++) {
             CTCol ithCol = cols.getColArray(i);
             long[] range1 = { ithCol.getMin(), ithCol.getMax() };
             long[] range2 = { col.getMin(), col.getMax() };



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to