Bug 12030 - [Cg] SVG PLT spends over 40% of its time in CGShading calls for SVGPaintServerGradient
Summary: [Cg] SVG PLT spends over 40% of its time in CGShading calls for SVGPaintServe...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-29 14:53 PST by Eric Seidel (no email)
Modified: 2011-05-18 11:09 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2006-12-29 14:53:26 PST
SVG PLT spends over 40% of its time in CGShading calls for SVGPaintServerGradient

CGShading is unfortunately quite inefficient.  Hopefully with the coming release of Leopard CG will have much improved shading support.  Only the Apple guys know what the future may hold in that area.

When you create a CGShading, you specify a function.  As I understand it, the first time a CGShading is used, it calls this function 1000 times (regardless of destination size) and caches the color values.  It then uses this cache for drawing.

Unfortunately, currently we seem to be discarding the CGShading object from SVGPaintServerGradient (and thus the color cache) far too often.  Doing so, results in this incredible slowdown to the PLT.

Again, hopefully a future release of Mac OS X will resolve this CGShading performance issue (by caching less!) or offer us an improved stop-based API (the current API is function based).  Until that time, we will have to do our best to aggressively cache CGShading objects in SVGPaintServerGradient, and work around this slowness.

I believe WildFox may already have a patch to address some of this issue.
Comment 1 Eric Seidel (no email) 2007-12-27 02:17:35 PST
Leopard does not yet offer a stop-based API, however I believe the CGShading performance is better.  We'll have to run the SVG PLT again to see.
Comment 2 Dirk Schulze 2011-05-18 10:31:44 PDT
What is SVG PLT? Changing the bug title to [Cg] SVG PLT spends over 40% of its time in CGShading calls for SVGPaintServerGradient. We may want to change the status to WONTFIX or FIXED later.
Comment 3 Eric Seidel (no email) 2011-05-18 11:09:11 PDT
Use the run-performance-test script in Tools/Scripts.  I believe it runs the SVG plt by default. :)
Comment 4 Eric Seidel (no email) 2011-05-18 11:09:37 PDT
Sorry, run-pageloadtest