Bug 14590 - Clipping to the document size slows down rendering significantly
Summary: Clipping to the document size slows down rendering significantly
Status: RESOLVED INVALID
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 11:22 UTC by Tom Hughes
Modified: 2008-02-21 19:43 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tom Hughes 2008-02-20 11:22:55 UTC
Attached are two copies of the same cairo generated PDF document.

The first one (fast.pdf) takes about 14 seconds to render on my machine (in evince  2.20.2 using poppler 0.6.2) and the second takes 28 seconds.

The only difference is that second one has a clipping path set that matches the document borders (this doesn't seem to make any difference to what PDF viewers display but does affect what SVG viewers display if I render to the SVG backend which is why I'm doing it).

With larger documents the slowdown seems to get larger - I've seen a jump from 30 seconds to 105 seconds with a larger document.
Comment 1 Tom Hughes 2008-02-20 11:26:41 UTC
Files are (just) too big to attached - they are at:

  http://www.compton.nu/fast.pdf

and:

  http://www.compton.nu/slow.pdf
Comment 2 Albert Astals Cid 2008-02-21 11:07:44 UTC
Well, you are adding a clipping rect and it goes slower, that's inside what would like normal to me.
Comment 3 Jeff Muizelaar 2008-02-21 14:56:14 UTC
(In reply to comment #0)
> Attached are two copies of the same cairo generated PDF document.
> 
> The first one (fast.pdf) takes about 14 seconds to render on my machine (in
> evince  2.20.2 using poppler 0.6.2) and the second takes 28 seconds.
> 
> The only difference is that second one has a clipping path set that matches the
> document borders (this doesn't seem to make any difference to what PDF viewers
> display but does affect what SVG viewers display if I render to the SVG backend
> which is why I'm doing it).
> 
> With larger documents the slowdown seems to get larger - I've seen a jump from
> 30 seconds to 105 seconds with a larger document.
> 

I'm guessing that if you use the git version of libpixman (used by cairo) the performance of the clipped document will improve considerably.
Comment 4 Tom Hughes 2008-02-21 16:48:11 UTC
I suspect you're right. I was seeing the same thing with cairo when generating the PDF until I switched to the git head code - it just hadn't clicked that because poppler was using cairo to render the PDF it was going to run into the same problem.

I'll check it out...
Comment 5 Tom Hughes 2008-02-21 16:51:20 UTC
Using git cairo with poppler does indeed remove the slowdown.
Comment 6 Jeff Muizelaar 2008-02-21 19:43:32 UTC
Right, it was indeed cairo not libpixman where the performance fix was made.


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.