[ https://issues.apache.org/jira/browse/PDFBOX-3763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976985#comment-15976985 ]
Tilman Hausherr commented on PDFBOX-3763: ----------------------------------------- Time for rendering p182 is about 30% lower now. > Optimize SampledImageReader.getStencilImage() > --------------------------------------------- > > Key: PDFBOX-3763 > URL: https://issues.apache.org/jira/browse/PDFBOX-3763 > Project: PDFBox > Issue Type: Bug > Components: Rendering > Affects Versions: 2.0.5 > Reporter: Tilman Hausherr > Assignee: Tilman Hausherr > Labels: optimization > Fix For: 2.0.6, 3.0.0 > > > I have a PDF file (which I can't share, it is p182 of the one from > https://stackoverflow.com/questions/43248021/pdfbox-2-unusual-memory-consumption > ) that needs over 3GB for rendering due to two stencil images that are 18694 > x 13214. PDFBox converts stencil images to RGB images, where 1 pixel needs 4 > bytes, so such an image uses 1GB. > After many dead ends over the easter weekend, I realized today that the > BufferedImage isn't needed at all - we can process the bits directly. > Memory footprint is down from 3.6GB to 2.2GB and it is faster too. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org