ICEpdf
  1. ICEpdf
  2. PDF-799

ImagePool is only caching image at paint not during parse.

    Details

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

      Description

      A part of the 5.0 work we integrated a bunch of code from a client. Part of this code was the ImagePool. An existing client had relatively small acad files that were popping the heap. On closer inspection a Jpeg image was being used 1200 times for painting some background stuff. On closer inspection the jpeg image was being parser and put into memory 1200 times instead of just once. On closer inspection the ImagePool was only being used at paint and not before an image was parsed.

      When an image is parse via an xobject the xobject can be used in multiple places in the content stream by name. So in this case the image was being used 1200 times in various places.

        Activity

        Patrick Corless created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #42496 Wed Sep 03 15:11:25 MDT 2014 patrick.corless PDF-799 added imagepool look up and put for ImageStream object. This avoids the overhead of loading a file more than once when it's a named reference used repeatedly.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImagePool.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/ImageStream.java
        Hide
        Patrick Corless added a comment -

        Not sure how this issue (parsing same image more then once) has never been risen in the past. ImagePool and ImageStream have been patched to avoid parsing the image stream twice and reusing the images across multiple paints.

        Show
        Patrick Corless added a comment - Not sure how this issue (parsing same image more then once) has never been risen in the past. ImagePool and ImageStream have been patched to avoid parsing the image stream twice and reusing the images across multiple paints.
        Patrick Corless made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.1 [ 10675 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: