Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.7.3
-
None
-
None
Description
The CosName class keeps a cache of all instances created in a static synchronized map. I am guessing this is for performance reasons to avoid creating objects, but in our system it is causing performance problems. We are running 7 threads extracting text from pdf's, and we can see a large number of conflicts reading from nameMap.
The CosName map is also a potential memory leak, which forces users to periodically clear it, as noted in PDFBOX-351
Can nameMap be removed altogether?
At the least, if PDSimpleFont replaced,
COSName.getPDFName( "FontDescriptor" )
with
COSName.FONT_DESC
It would reduce contention.