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

Cache TilingPaint generation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.4
    • 2.0.5, 3.0.0 PDFBox
    • PDModel
    • None

    Description

      The attached file gs-bugzilla692158-schleuse-veryslow.pdf is extremely slow to render. It takes hours. The cause is that identical TilingPaint objects are generated again and again, i.e. each time the pattern image must be drawn again. I tried a very simple caching mechanism and now the file renders in 20 seconds.

      Although the very basic caching worked for all test files, it can't be used because parameters could change: initial matrix, xform, color and colorspace.

      For this I'll use a factory class that has a class to compare the parameters, and this is to be used as key.

      Attachments

        1. gs-bugzilla692158-schleuse-veryslow.pdf
          1.96 MB
          Tilman Hausherr

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              tilman Tilman Hausherr
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: