icepdf
icepdf copied to clipboard
Severe performance problem with some (Geo)PDF files
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?
Thanks for the file, taking a look. And sorry for the late reply, I didn't see this issue come in.
By the way, ICEpdf is not the only one struggling with this type of file, Evince also takes a long time to open it.