]> source.dussan.org Git - poi.git/commitdiff
Patch from Jan from bug #54282 - Improve the performance of ColumnHelper addCleanColI...
authorNick Burch <nick@apache.org>
Wed, 12 Dec 2012 00:48:13 +0000 (00:48 +0000)
committerNick Burch <nick@apache.org>
Wed, 12 Dec 2012 00:48:13 +0000 (00:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1420501 13f79535-47bb-0310-9956-ffa450edef68

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

index b8b3e81d219e0544052ec86f93f9b155bdb4f86d..8fef9acb234ad1275cd748dff5df5a79f6063531 100644 (file)
@@ -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>
index 3655affc44146a055c9816421d44bb97dd91b195..46ca2f6737067f88afa0fe1eb2ef652427e37338 100644 (file)
@@ -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() };