From: Javen O'Neal Date: Sat, 11 Jun 2016 00:38:42 +0000 (+0000) Subject: bug 57840: initialize the column header cache with 50% empty space X-Git-Tag: REL_3_15_BETA2~164 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=79166ad641c95c7010eb49f7bb2adfd867cadd4c;p=poi.git bug 57840: initialize the column header cache with 50% empty space git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747823 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java index f4b5ee9067..d7b26d2bc5 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java @@ -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 POIXMLDocumentPart implements Table { if (columnHeader == null) return -1; if (columnMap == null) { // FIXME: replace with org.apache.commons.collections.map.CaseInsensitiveMap - int count = getTableColumns().length; - columnMap = new HashMap(count); + final int count = getTableColumns().length; + columnMap = new HashMap(count * 3 / 2); for (int i=0; i < count; i++) { String columnName = getTableColumns()[i].getName();