[ https://issues.apache.org/jira/browse/PDFBOX-2587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14263149#comment-14263149 ]
John Hewson commented on PDFBOX-2587: ------------------------------------- VisualVM's top CPU time methods for this file are: {code} org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.toRGBImageAWT() 65,366 ms (49.5%) org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.loadICCProfile() 63,302 ms (47.9%) {code} This PDF file is very strange, it contains 3627 images and renders them over and over again. This is why we're seeing such a slow rendering. However, PDFBox could speed things up by caching color spaces which would limit loadICCProfile() to a single call, rather than thousands. It may also be possible to bypass the color conversion in toRGBImageAWT() because the embedded profile is sRGB, which is, I think, the same as Graphics2D already uses. > PDF takes minutes to convert > ---------------------------- > > Key: PDFBOX-2587 > URL: https://issues.apache.org/jira/browse/PDFBOX-2587 > Project: PDFBox > Issue Type: Bug > Components: Rendering > Affects Versions: 2.0.0 > Reporter: simon steiner > Attachments: RamDiskTest1.pdf > > > time java -cp > lib/jai_imageio.jar:/home/simon/pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar > org.apache.pdfbox.tools.PDFToImage RamDiskTest1.pdf > real 2m40.462s -- This message was sent by Atlassian JIRA (v6.3.4#6332)