ICEpdf
  1. ICEpdf
  2. PDF-833

Colour space colour caches are causing memory issues in server environments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.1.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      The DeviceCMYK and ICCBased colour space classes have caches for colours that have been calculated into RGB. A client expressed concern that the DeviceCMYK class is not freeing up its memory. This in-particular is an issue as the server environment has a very long uptime and the cache is never emptied.

      On closer inspection, the DeviceCMYK cache is static which will be a memory issue. And the ICCBased class has a logic error, the class has static cache but instantiates a new instance in the constructor.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 5.1.2 [ 11872 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #43610 Wed Nov 26 13:32:26 MST 2014 patrick.corless PDF-833 removed static colour caches, to address long running server memory bleed.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/DeviceCMYK.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/ICCBased.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #43611 Wed Nov 26 13:32:54 MST 2014 patrick.corless PDF-833 removed static colour caches, to address long running server memory bleed.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/DeviceCMYK.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/ICCBased.java
        Hide
        Patrick Corless added a comment -

        Moved the caches to a local instance of the color space. This should address the buildup of the cache on a long running server. A weak reference cache could be introduced but I think that having a cache per document's colour space will still speed up image decode without taking up a log of memory.

        Show
        Patrick Corless added a comment - Moved the caches to a local instance of the color space. This should address the buildup of the cache on a long running server. A weak reference cache could be introduced but I think that having a cache per document's colour space will still speed up image decode without taking up a log of memory.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Patrick Corless added a comment -

        change's applied to trunk and 5.0.1 branch and release to client in 5.1.1 P02

        Show
        Patrick Corless added a comment - change's applied to trunk and 5.0.1 branch and release to client in 5.1.1 P02
        Arran Mccullough made changes -
        Support Case References Support case #13182 - https://icesoft.my.salesforce.com/5007000000tjmp5
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #43649 Thu Dec 04 11:00:11 MST 2014 patrick.corless PDF-833 added new system property org.icepdf.core.quickclip=false by default. Enabling it will speed up the parsing of many PDF's but may also cause clipping artifactse, this off by default.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/GraphicsState.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: