You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/05/12 08:27:04 UTC

[jira] [Comment Edited] (PDFBOX-3791) Long rendering time

    [ https://issues.apache.org/jira/browse/PDFBOX-3791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16007769#comment-16007769 ] 

Tilman Hausherr edited comment on PDFBOX-3791 at 5/12/17 8:26 AM:
------------------------------------------------------------------

Some thoughts after profiling... Most time is spent in
- graphics.drawImage - this we can't change, or the quality would go down
- ImageReader.read - can't change
- DCTFilter.fromBGRtoRGB - maybe... maybe write on the source raster instead of making a copy?
- ScratchFileBuffer.read - maybe... it is called with small chunks in SampledImageReader.from8bit, the bytes for 1 pixel, thus usually only 3 bytes at a time. This was done in PDFBOX-2301 [ https://svn.apache.org/r1684745 ] to lessen the memory footprint. Reverting that change makes it about 20% faster but increases the memory footprint, obviously. Maybe make a compromise by reading one row at a time.


was (Author: tilman):
Some thoughts after profiling... Most time is spent in
- graphics.drawImage - this we can't change, or the quality would go down
- ImageReader.read - can't change
- DCTFilter.fromBGRtoRGB - maybe... maybe write on the source raster instead of making a copy?
- ScratchFileBuffer.read - maybe... it is called with small chunks in SampledImageReader.from8bit, the bytes for 1 pixel, thus usually only 3 bytes at a time.


> Long rendering time
> -------------------
>
>                 Key: PDFBOX-3791
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3791
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.5
>         Environment: windows
>            Reporter: Esteban Nicolas Ruiz
>         Attachments: slowrender.pdf
>
>
> Attached pdf file takes too long (more then 9 secs) to render in PDFDebugger (this is a simplified version of a real life pdf that I can not publish for privacy reasons, it takes 57 seconds to render and it contains 56 images and some text).
> I have tried with the options provided in https://pdfbox.apache.org/2.0/getting-started.html but performance is the same



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org