[ 
https://issues.apache.org/jira/browse/PDFBOX-3442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15408472#comment-15408472
 ] 

John Hewson commented on PDFBOX-3442:
-------------------------------------

Yeah that's what I had in mind. Looking at it now though I wonder if maybe we 
should take a hybrid of the two approaches, i.e. storing the direct cache in 
PDResources but using SoftReference. Given that there's no point caching the 
font beyond the lifetime of the PDResources that created it, and the fact that 
SoftReference in this case is essentially the behaviour that everyone wants. 
That way we keep PDResourceCache for resources shared across pages only.

> OOM for single page pdf file
> ----------------------------
>
>                 Key: PDFBOX-3442
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3442
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 2.0.2, 2.0.3, 2.1.0
>            Reporter: Tim Allison
>            Priority: Minor
>         Attachments: res.diff, res2.diff
>
>
> On TIKA-2045, a user posted a single page document that leads to OOM with 
> -Xmx1g.  I confirmed this with PDFBox's ExtractText.
> Might be a memory leak with the fonts?  See 
> [this|https://issues.apache.org/jira/browse/TIKA-2045?focusedCommentId=15399583&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15399583]
>  for some diagnostics I did.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to