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
This commit is contained in:
Javen O'Neal 2016-06-11 00:38:42 +00:00
parent 52e866f4bc
commit cd4058fd60

View File

@ -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<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();