You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/06/11 00:38:42 UTC

svn commit: r1747823 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java

Author: onealj
Date: Sat Jun 11 00:38:42 2016
New Revision: 1747823

URL: http://svn.apache.org/viewvc?rev=1747823&view=rev
Log:
bug 57840: initialize the column header cache with 50% empty space

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java?rev=1747823&r1=1747822&r2=1747823&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java Sat Jun 11 00:38:42 2016
@@ -1,4 +1,4 @@
-/* ====================================================================
+(count/* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
@@ -358,8 +358,8 @@ public class XSSFTable extends POIXMLDoc
         if (columnHeader == null) return -1;
         if (columnMap == null) {
             // FIXME: replace with org.apache.commons.collections.map.CaseInsensitiveMap
-            int count = getTableColumns().length;
-            columnMap = new HashMap<String, Integer>(count);
+            final int count = getTableColumns().length;
+            columnMap = new HashMap<String, Integer>(count * 3 / 2);
             
             for (int i=0; i < count; i++) {
                 String columnName = getTableColumns()[i].getName();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org