ICEpdf
  1. ICEpdf
  2. PDF-836

Reduce time spend in GraphicState.restore

    Details

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

      Description

      A client has sent in a architecture PDF that has a very large number of q and Q operators in it and our restore method (Q) is taking up about 50 seconds of time just doing Area equals calculations.

      In the past we have tried to optimize this by using the clip's bounds rather then area. I would like to revisit this and try to figure out why previous approaches have yielded regressions.

        Activity

        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Patrick Corless added a comment -

        Marking as closed

        Show
        Patrick Corless added a comment - Marking as closed
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Patrick Corless added a comment -

        Marking as resolved for now. Improvements have been made but still no magic bullet for very complex paints.

        Show
        Patrick Corless added a comment - Marking as resolved for now. Improvements have been made but still no magic bullet for very complex paints.
        Patrick Corless made changes -
        Fix Version/s 5.2 [ 10970 ]
        Fix Version/s 5.3 [ 12070 ]
        Patrick Corless made changes -
        Fix Version/s 5.3 [ 12070 ]
        Fix Version/s 5.2 [ 10970 ]
        Patrick Corless made changes -
        Component/s Core/Rendering [ 10974 ]
        Patrick Corless made changes -
        Fix Version/s 5.1.2 [ 11872 ]
        Hide
        Patrick Corless added a comment -

        If we don't do the area clip comparison then we push all the clips into the painting pipeline and the render time is even longer as setting this large number of clips takes even longer then then comparing them.

        I've checked in experimental code on the 5.0.1 branch that can be enable with the system property org.icepdf.core.quickclip=true. When enabled a QA run results in a just a handful of regressions related to clips size. However we have no regressions in the large number or architectural diagrams.

        Show
        Patrick Corless added a comment - If we don't do the area clip comparison then we push all the clips into the painting pipeline and the render time is even longer as setting this large number of clips takes even longer then then comparing them. I've checked in experimental code on the 5.0.1 branch that can be enable with the system property org.icepdf.core.quickclip=true. When enabled a QA run results in a just a handful of regressions related to clips size. However we have no regressions in the large number or architectural diagrams.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #43650 Thu Dec 04 11:18:39 MST 2014 patrick.corless PDF-836 tweaked default code to clip properly.
        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 -
        Field Original Value New Value
        Fix Version/s 5.1.2 [ 11872 ]
        Fix Version/s 5.2 [ 10970 ]
        Patrick Corless created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #43647 Thu Dec 04 08:59:53 MST 2014 patrick.corless PDF-836 using clip bounds to compare clips.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/commands/DrawDrawCmd.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/GraphicsState.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: