Details
-
Type: Bug
-
Status: Closed
-
Priority: 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 toPDF-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.
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
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
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #37474 | Wed Aug 21 13:00:21 MDT 2013 | patrick.corless | |
Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImagePool.java
MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImageReference.java MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/ScaledImageReference.java |