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

Cache ColorSpace instances in PDColorSpace.java

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.7, 2.0.8
    • 2.0.9, 3.0.0 PDFBox
    • Rendering
    • Windows 10
    • Patch

    Description

      I have a PDF which contains a lot of Images. Each time, pdfbox parse the image it uses the colorspace to parse it and most of the time colorspace is the same object. I tried to cache the colorspace instances in PDColorSpace.java as shown in the attached patch. For this particular PDF, this change improves the performance of parsing and rendering the images from 15 minutes down to 3 minutes. I shared the PDF.

      Attachments

        1. PDColorSpace.java.patch
          2 kB
          savan patel
        2. selection.pdf
          5.61 MB
          savan patel

        Activity

          People

            tilman Tilman Hausherr
            savan savan patel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: