Last Comment Bug 311936 - Clipping causing serious performance problems
: Clipping causing serious performance problems
: fixed1.8, hang
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
-- critical (vote)
: ---
Assigned To: tor
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2005-10-10 10:56 PDT by tor
Modified: 2005-10-13 11:24 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

bound clip surface to target surface (1.63 KB, patch)
2005-10-10 10:58 PDT, tor
tor: review+
asa: approval1.8rc1+
Details | Diff | Splinter Review

Description User image tor 2005-10-10 10:56:33 PDT
If the clip path is larger than the target surface, cairo ends up creating a
clip surface big enough to contain the clip trapezoids.  When the pan&zoom apis
are being used, this can cause very serious performance problems.
Comment 1 User image tor 2005-10-10 10:58:00 PDT
Created attachment 199086 [details] [diff] [review]
bound clip surface to target surface
Comment 2 User image Jonathan Watt [:jwatt] 2005-10-11 01:59:33 PDT
marking critical and adding hang keyword
Comment 3 User image Carl Worth 2005-10-12 14:53:17 PDT
I've reviewed this patch, and it seems an obviously correct performance fix.

I've tested it with cairo's test suite as well as with a cairo-using svg2png on
the W3C SVG suite, and in both cases found no differences in the output result.
The patch can only affect performance in a positive way, and can do so
dramatically, as you have noted.

Will you please commit this (with an appropriate ChangeLog entry) to both cairo
HEAD and cairo BRANCH_1_0.


Comment 4 User image tor 2005-10-12 15:26:09 PDT
Comment on attachment 199086 [details] [diff] [review]
bound clip surface to target surface

Setting review flag based on comment 3 by Carl Worth (cairo author), as he
doesn't have permission to change the flags.

Checked into cairo cvs trunk and branch.

Requesting 1.8rc1 approval as this is a denial of service problem
that content developers can stumble into accidentally.	Cartography
is an example of a userbase whose document structures are prone to
experience this.  Patch has been reviewed by the author of cairo,
and is merged upstream.  Risk is very small.
Comment 5 User image tor 2005-10-13 11:24:57 PDT
Checked in on branch.

Note You need to log in before you can comment on or make changes to this bug.