Bug 81211 - high cpu usage with some pdf in okular
Summary: high cpu usage with some pdf in okular
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: splash backend (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-11 07:17 UTC by Eugenio
Modified: 2018-07-05 14:10 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
pdf (69.78 KB, application/pdf)
2014-07-11 07:17 UTC, Eugenio
Details
Optimize opaque fills (2.10 KB, patch)
2018-05-21 21:36 UTC, Stefan Brüns
Details | Splinter Review
Optimize opaque fills for AABGR8 (2.02 KB, patch)
2018-05-26 00:24 UTC, Stefan Brüns
Details | Splinter Review

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.