icepdf icon indicating copy to clipboard operation
icepdf copied to clipboard

Severe performance problem with some (Geo)PDF files

Open hexagontomn opened this issue 5 years ago • 2 comments

Example file: ENAME H-5 23 APR 2020.pdf

When opening this file in the IcePDF viewer, it takes almost 15 full minutes to render. Stack dumps taken during the wait consistently show this:

"ICEpdf-thread-pool" #30 daemon prio=5 os_prio=0 cpu=757125.00ms elapsed=777.59s tid=0x00000221dc217800 nid=0x44b8 runnable  [0x000000b9117fd000]
   java.lang.Thread.State: RUNNABLE
        at sun.awt.geom.AreaOp.pruneEdges([email protected]/AreaOp.java:407)
        at sun.awt.geom.AreaOp.calculate([email protected]/AreaOp.java:159)
        at java.awt.geom.Area.pathToCurves([email protected]/Area.java:195)
        at java.awt.geom.Area.transform([email protected]/Area.java:528)
        at org.icepdf.core.pobjects.graphics.GraphicsState.updateClipCM(GraphicsState.java:586)
        at org.icepdf.core.util.content.AbstractContentParser.consume_cm(AbstractContentParser.java:419)
        at org.icepdf.core.util.content.OContentParser.parse(OContentParser.java:239)
        at org.icepdf.core.pobjects.Page.init(Page.java:438)
        - locked <0x00000000c813e848> (a org.icepdf.core.pobjects.Page)
        at org.icepdf.ri.common.views.AbstractPageViewComponent$PageImageCaptureTask.call(AbstractPageViewComponent.java:413)
        at java.util.concurrent.FutureTask.run([email protected]/FutureTask.java:264)
        at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1130)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:630)
        at java.lang.Thread.run([email protected]/Thread.java:832)

Other tools (tested Acrobat Viewer and Chrome) display the file in a matter of seconds.

We have plenty of other files which do not trigger this problem, so perhaps there is some sort of dodgy construct in this particular one that IcePDF can't handle well?

hexagontomn avatar Jul 29 '20 11:07 hexagontomn

Thanks for the file, taking a look. And sorry for the late reply, I didn't see this issue come in.

pcorless avatar Aug 18 '20 04:08 pcorless

By the way, ICEpdf is not the only one struggling with this type of file, Evince also takes a long time to open it.

gtache avatar Sep 03 '20 15:09 gtache