Summary: Rendering PDF files which contain JBIG2 or CCITT encoded images is comparably slower under poppler 0.60.1 than under 0.56.1
Description: See above. I am using evince 3.26.0. Rendering is considerably slower, that is about 3-4 seconds compared to <1 second with poppler 0.56.1. Downgrading to poppler 0.56.1 resolves this problem.
Attach such a file
Created attachment 134782 [details]
Here is an example file containing JBIG2 images.
cairo backend regression, splash still works fine
Thank you for looking into this. How do I use the splash backend instead of cairo?
This is caused by the switch to using cairo downscaling instead of the builtin downscaling.
Running some quick tests it seems the cairo downscaling time is roughly proportional to the source image size while the custom downscaling is closer to the target size. So for downscaling to small scales we are taking a large performance hit.
Created attachment 134836 [details] [review]
use custom downscaling if scale < 0.5
This patch uses custom downscaling when scale is < 0.5.
Created attachment 134861 [details]
Example Document #2
Comment on attachment 134861 [details]
Example Document #2
Thank you very much for the patch! I applied and recompiled poppler against it.
However, it doesn't seem to do the trick; the rendering is still quite slow compared to 0.56.1.
Please find attached another document which is problematic.
@Adrian can you fix the bug title since from your description it seems it has nothing to do with JBIG2/CCITT at all
Maybe we should just switch to use GOOD instead of BEST?
I recently started seeing significant slow downs while navigating through PDF files and I believe it to be this issue. (The timing is consistent with a upgrade to poppler version 0.61.0 on my machine.)
I began noticing this because it started taking multiple seconds and 100% CPU (core) usage to change between pages or re-zoom pages in PDFs provided by NASA's Astrophysics Data System (e.g. PDF at http://adsabs.harvard.edu/abs/1995ApJ...442..337P).
I viewed the documents attached to this message using emacs pdf-tools and evince (both of which use poppler) and confirm I see the slow behavior.
How would I go about changing GOOD to BEST to see if it helps my use case?
Adrian, what do you think about using GOOD instead of BEST by default?
I found that 0.59.0 is already very slow.
The 0.57.0 works as it should.
I was unable to find a 0.58.0 build for my system.
The problem is still there in 0.62.0.
And I observed that only applications that are using poppler-glib8 are affected like evince, xournal, zathura.
Application that are using libpoppler-qt5-1 works well, like okular, qpdfview.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.