pdf-renderer
  1. pdf-renderer
  2. PDF_RENDERER-151

The Softreference based cache in PDFFile class causes "outages" because of high garbage collector activity

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      java version "1.6.0_26"
      Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
      Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

      Windows 7 Enterprise X64

      Description

      We experienced "outages", periods without any JVM activity (i mean any response to clients) in our system. We realized, that this is caused by the soft reference cache in PDFFile class.

      I created a small test project (eclipse project), which contains the followings:

      • a hacky subclass of PDFFile and Cache classes, which lets you basicly switch off this built in caching
      • a unit test containing one test method with caching and without caching to let you to compare the results. A PDF file is converted into a set of JPG files. ~300 pages.

      I also traced the JVM, and I attached the results. 256M and 512M heap with and without caching. From the graphs it can be easily seen, that the caching in general takes a lot of CPU time for the garbage collection, and there are "outages", when the whole CPU time is consumed by GC. On the other hand without caching the whole process is not slower at all, and the GC activity and heap size is pretty normal.

      I would suggest to throw away this caching, or to make it switchable.

        Activity

        Hide
        liptga added a comment -

        Hmm. It would be nice to have a fix for it. I get an exception during startup (i have no idea, why is it not coming with JUnit test in eclipse), that my class is has no matching signature (my subclass). See http://stackoverflow.com/questions/2877262/java-securityexception-signer-information-does-not-match

        So right now I am enforced to include a pdfrenderer.jar without signature information in the META-INF folder, wich solution I really dont like.

        Show
        liptga added a comment - Hmm. It would be nice to have a fix for it. I get an exception during startup (i have no idea, why is it not coming with JUnit test in eclipse), that my class is has no matching signature (my subclass). See http://stackoverflow.com/questions/2877262/java-securityexception-signer-information-does-not-match So right now I am enforced to include a pdfrenderer.jar without signature information in the META-INF folder, wich solution I really dont like.

          People

          • Assignee:
            Unassigned
            Reporter:
            liptga
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 4 hours
              4h
              Remaining:
              Remaining Estimate - 4 hours
              4h
              Logged:
              Time Spent - Not Specified
              Not Specified