Bug 12030
Summary: | [Cg] SVG PLT spends over 40% of its time in CGShading calls for SVGPaintServerGradient | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | krit |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Eric Seidel (no email)
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
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.
Dirk Schulze
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.
Eric Seidel (no email)
Use the run-performance-test script in Tools/Scripts. I believe it runs the SVG plt by default. :)
Eric Seidel (no email)
Sorry, run-pageloadtest