Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2323

More flexible image caching (OOM)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • PDModel, Rendering
    • None

    Description

      Image caching in PDImageXObject can cause very high memory usage which has resulted in issues PDFBOX-2313, PDFBOX-2310, PDFBOX-2101. Images are just so large that the current "on size fits all" caching isn't working well.

      Pushing responsibility for caching down to callers of PDImage#getImage() would allow for use-case specific caching strategies, for example PDFRenderer could cache small images for the duration of a document being rendered, rather than having to re-create the PDImageXObject again for every page on which it appears. Likewise caching of large images could be limited to a single page, or not at all.

      Attachments

        1. PDFBOX-2323-245999-p7-outofmemory.pdf
          466 kB
          Tilman Hausherr

        Issue Links

          Activity

            People

              jahewson John Hewson
              jahewson John Hewson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: