Bug 81211

Summary: high cpu usage with some pdf in okular
Product: poppler Reporter: Eugenio <eugenio89>
Component: splash backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: 4pfq30f5e8ee, stefan.bruens
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: pdf
Optimize opaque fills
Optimize opaque fills for AABGR8

Description Eugenio 2014-07-11 07:17:54 UTC
Created attachment 102599 [details]
pdf

With some pdf (exported from libreoffice impress) okular uses 100% of one cpu. After a long time it ends and loads correctly the pdf.
Other pdf viewer (e.g. evince) work as expected (loads in 1-2 sec and without using a lot of cpu).
I found that the problem seems to be this particular background.

Kde Bug: https://bugs.kde.org/show_bug.cgi?id=336656
Comment 1 Stefan Brüns 2018-05-21 21:34:24 UTC
The background contains two radial gradients, one at the top (the "glow" in the center of the green bar), and one in the center.

Both gradients are approximated by stacked circles/ellipses with slowly varying color and radius.

On a dualcore Haswell system, the background renders in about 4 seconds for me, which is not incredibly fast, but ok given the contents.
Comment 2 Stefan Brüns 2018-05-21 21:36:39 UTC
Created attachment 139669 [details] [review]
Optimize opaque fills
Comment 3 Albert Astals Cid 2018-05-23 20:06:47 UTC
Stefan, nice patch!

I've pushed it together with same patch for the non X variant that pdftoppm uses by default.
Comment 4 Stefan Brüns 2018-05-26 00:24:49 UTC
Created attachment 139781 [details] [review]
Optimize opaque fills for AABGR8
Comment 5 Albert Astals Cid 2018-05-26 10:02:56 UTC
Isn't that the same patch i did?
Comment 6 Stefan Brüns 2018-05-26 10:50:13 UTC
No, my original patch touched XBGR, you did _RGB, this is for _BGR.
Comment 7 Stefan Brüns 2018-07-04 23:53:35 UTC
Albert, as this patch is comparatively trivial, can you push it?
Comment 8 Albert Astals Cid 2018-07-05 14:10:58 UTC
Done

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.