[
https://issues.apache.org/jira/browse/PDFBOX-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Lehmkühler resolved PDFBOX-441.
---------------------------------------
Resolution: Fixed
Fix Version/s: 1.2.0
With version 928461 I've replaced the WeakHashMap with a ConcurrentHashMap.
> remove CosName nameMap cache
> ----------------------------
>
> Key: PDFBOX-441
> URL: https://issues.apache.org/jira/browse/PDFBOX-441
> Project: PDFBox
> Issue Type: Improvement
> Affects Versions: 0.7.3
> Reporter: Sean Bridges
> Priority: Minor
> Fix For: 1.2.0
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.