ICEpdf
  1. ICEpdf
  2. PDF-602

Image proxy concurrency issue.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0, 5.0.1, 5.0.2
    • Fix Version/s: 5.0.3
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any
    • Salesforce Case Reference:
    • Workaround Exists:
      Yes
    • Workaround Description:
      -Dorg.icepdf.core.imageProxy=false

      Description

      I've been working with the profiler for a few days now and have several issue that appear to contribute the blank page views.

      The first big issue was the locking associated with the Image proxy in that it wan't working correctly. It was possible for the image proxy to skip over images and not display them. This imageReference class have been reworked to use the FutureTask and Callable interface. When ample memory is provided and the thread count increased the performance gains is quite noticeable.

      Another areas of concern was the amount of time spend waiting sun.graphcs.fill. AFter doing some experimenting it became clear that painting shouldn't be in parallel. A new single thread ThreadPoolExecutor was added to the library queue up any paint requests.

      The pageComponent also was doing some awt work around annotation setLocation, setbounds and validate was being done on the painter thread. These hot spots where queued up to run on the awt thread via SwingUtilities.invokeLater().

      While working on the MipMappedImageReference I found an issue where the proxy was causing repeated scaling to fail. This issue was related to PDF-577 as well.

      To avoid thread starvation of the common thread pool in library I created one more just for the image proxy. The problem in testing was that if page has a bunch of images on it in a multipage view no futher pages would be initialized or in other words the page initialization running wouldn't get started. The page initialization is now handle by the common thread pool and image loading proxy by another pool. Page loading in a multi-page view seems to be a lot smoother now with less delays.

      And finally as an experiment I changed the default GraphicsRenderingHints for screen. The changes will paint at a slightly lower quality with the intention of painting faster.

        Activity

        Patrick Corless created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36192 Wed Jun 12 16:24:01 MDT 2013 patrick.corless PDF-602 fixed image proxy concurrency issues, mipmap scaling, paint fill blocking issues, and thread starvations issues with only one thread pool.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/util/Library.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/viewer/src/org/icepdf/ri/common/views/annotations/AbstractAnnotationComponent.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/ScaledImageReference.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/util/LazyObjectLoader.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImageReference.java
        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/graphics/ImageStreamReference.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/MipMappedImageReference.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/util/GraphicsRenderingHints.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImageReferenceFactory.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/viewer/src/org/icepdf/ri/common/views/PageViewComponentImpl.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/InlineImageStreamReference.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/viewer/src/org/icepdf/ri/common/PageThumbnailComponent.java
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000Ua7kOAAR
        Hide
        Patrick Corless added a comment -

        Closing, image proxy is now working as expected.

        Show
        Patrick Corless added a comment - Closing, image proxy is now working as expected.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Workaround Description -Dorg.icepdf.core.imageProxy=false
        Workaround Exists Yes [ 10007 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37474 Wed Aug 21 13:00:21 MDT 2013 patrick.corless PDF-602 fixed image proxy concurrency issues, mipmap scaling, paint fill blocking issues, and thread starvations issues with only one thread pool.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImagePool.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImageReference.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/ScaledImageReference.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: