From 79166ad641c95c7010eb49f7bb2adfd867cadd4c Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sat, 11 Jun 2016 00:38:42 +0000 Subject: [PATCH] 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 --- src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.39.5