Bug 13487

Summary: Slow rendering of file with lot of group objects
Product: poppler Reporter: Emmanuel Pacaud <emmanuel.pacaud>
Component: splash backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: The sample file.
remove unnecesary transparency group handling in splash

Description Emmanuel Pacaud 2007-12-02 06:46:27 UTC
The attached file is very slow to render using evince 2.20.1/poppler 0.6.2/cairo (ubuntu gutsy).
Comment 1 Emmanuel Pacaud 2007-12-02 06:47:23 UTC
Created attachment 12906 [details]
The sample file.
Comment 2 Albert Astals Cid 2009-06-17 14:37:46 UTC
Not cairo specific, actually cairo seems faster than splash
Comment 3 Carlos Garcia Campos 2009-11-18 08:30:12 UTC
1,1 seconds with cairo backend, I think it's reasonable, moving to splash. 
Comment 4 Thomas Freitag 2012-04-16 02:57:53 UTC
I had a look into that sample: It seems, as if cairo produced a lot a transparency group entries in the PDF, which slows down rendering in splash. According to a the PDF spec (11.4.4 Group Compositing Computations, page 337, note 5):

As a result of these corrections, the effect of compositing objects as a group is the same as that of compositing them separately (without grouping) if the following conditions hold:
1. The group is non-isolated and has the same knockout attribute as its parent group (see 11.4.5, "Isolated Groups," and “Knockout Groups”).
2. When compositing the group’s results with the group backdrop, the Normal blend mode is used, and the shape and opacity inputs are always 1.0.

it should be quite easy to recognize this in the splash transparency group functions and "remove" this behaviour in splash. I already tested it, hard coding transpGroup to gFalse in Gfx: rendering time less than one second, result seems to be the same.

I'll try to implement it for 0.22.0
Comment 5 Thomas Freitag 2012-05-01 23:00:32 UTC
Created attachment 60877 [details] [review]
remove unnecesary transparency group handling in splash

This patch avoids unnecesary transparency group handling in splash and renders the sample PDF really fast.
Comment 6 Albert Astals Cid 2012-05-13 08:27:55 UTC
Awesome job
Pushed :-)

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.