You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2011/05/12 21:01:47 UTC

[jira] [Created] (PDFBOX-1009) Limit the CMap-cache to external CMaps

Limit the CMap-cache to external CMaps
--------------------------------------

                 Key: PDFBOX-1009
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1009
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 1.5.0
            Reporter: Andreas Lehmkühler
            Assignee: Andreas Lehmkühler
             Fix For: 1.6.0


Antoni Mylka found a potential memory leak within the class PDFont [1]
A static map is used to cache all processed CMaps, which leads after while to a huge amount of allocated memory. 

IMO it doesn't make sense to cache embedded CMaps as they are only needed within the font embedding them and those CMaps are already stored in the variable "cmap". We should limit the cache to external CMaps like those which are bundled with pdfbox.


[1] http://markmail.org/message/zwhd3as67vpg7vbb

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PDFBOX-1009) Limit the CMap-cache to external CMaps

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032590#comment-13032590 ] 

Andreas Lehmkühler commented on PDFBOX-1009:
--------------------------------------------

I limited the cache to external CMaps in revision 1102424 as described above. The performance didn't change even when extracting large pdfs like the pdf-reference or the unicode code charts.

> Limit the CMap-cache to external CMaps
> --------------------------------------
>
>                 Key: PDFBOX-1009
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1009
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.5.0
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.6.0
>
>
> Antoni Mylka found a potential memory leak within the class PDFont [1]
> A static map is used to cache all processed CMaps, which leads after while to a huge amount of allocated memory. 
> IMO it doesn't make sense to cache embedded CMaps as they are only needed within the font embedding them and those CMaps are already stored in the variable "cmap". We should limit the cache to external CMaps like those which are bundled with pdfbox.
> [1] http://markmail.org/message/zwhd3as67vpg7vbb

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (PDFBOX-1009) Limit the CMap-cache to external CMaps

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler resolved PDFBOX-1009.
----------------------------------------

    Resolution: Fixed

> Limit the CMap-cache to external CMaps
> --------------------------------------
>
>                 Key: PDFBOX-1009
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1009
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.5.0
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.6.0
>
>
> Antoni Mylka found a potential memory leak within the class PDFont [1]
> A static map is used to cache all processed CMaps, which leads after while to a huge amount of allocated memory. 
> IMO it doesn't make sense to cache embedded CMaps as they are only needed within the font embedding them and those CMaps are already stored in the variable "cmap". We should limit the cache to external CMaps like those which are bundled with pdfbox.
> [1] http://markmail.org/message/zwhd3as67vpg7vbb

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira