pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1720905 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java
Date Sat, 19 Dec 2015 12:21:39 GMT
Author: lehmi
Date: Sat Dec 19 12:21:38 2015
New Revision: 1720905

URL: http://svn.apache.org/viewvc?rev=1720905&view=rev
Log:
PDFBOX-3131: preallocate the expected amount of values for collections to avoid massive resizing
operations

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java?rev=1720905&r1=1720904&r2=1720905&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java Sat Dec 19 12:21:38
2015
@@ -36,7 +36,7 @@ public final class COSName extends COSBa
 
     // all common COSName values are stored in this HashMap
     // hey are already defined as static constants and don't need to be synchronized
-    private static Map<String, COSName> commonNameMap = new HashMap<String, COSName>();
+    private static Map<String, COSName> commonNameMap = new HashMap<String, COSName>(768);
 
     //
     // IMPORTANT: this list is *alphabetized* and does not need any JavaDoc



Mime
View raw message