Bug 82051 - Direct shadow casting by the background is an unnaturally *slow* path on some ports for some apps
Summary: Direct shadow casting by the background is an unnaturally *slow* path on some...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-23 06:35 PDT by Tom Hudson
Modified: 2012-03-23 11:15 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hudson 2012-03-23 06:35:16 PDT
http://trac.webkit.org/changeset/107836 (https://bugs.webkit.org/show_bug.cgi?id=78728) caused a severe performance regression for Chromium: an app under development with a large scrolling div that casts a shadow went from 6ms/frame paint time to 40-50ms/frame paint time while scrolling, all of the additional time spent in a blur.
Comment 1 Tom Hudson 2012-03-23 06:37:25 PDT
If I comment out two lines of the BoxShadow CL from Feb 15 (turning off the "fast path" in RenderBoxModelObject::fillPaintLayerExtended() and reactivating the "slow path" in RenderBox::paintBoxDecorations()), Chromium performance returns to what we were seeing before this change.
Comment 2 mitz 2012-03-23 07:33:26 PDT
Sorry about that! I had no intention to make any port or any app slower. Are you able to attach a test case that shows this slowdown, or otherwise to tell whether r107836 made that case slower in the OS X, Quartz-based WebKit?

I think the way to address this probably would be to refine the logic that determines if the shadow should be cast by the background, but I am wondering if the decision should be dependent on the GraphicsContext implementation.
Comment 3 Simon Fraser (smfr) 2012-03-23 10:21:09 PDT
Perhaps this should be considered to be a Skia performance bug?
Comment 4 mitz 2012-03-23 10:29:13 PDT
(In reply to comment #3)
> Perhaps this should be considered to be a Skia performance bug?

We shouldn’t make changes in WebKit that make it slower, regardless of platform bugs.
Comment 5 Tom Hudson 2012-03-23 11:15:52 PDT
It might be something in the platform glue for Chromium, rather than Skia? The new code path ends up being presented to Skia as a 4px radius gaussian blur of the 1000x800 div that's being scrolled; I presume CG is doing something much smarter if this is a fast path. I filed http://code.google.com/p/chromium/issues/detail?id=119778 against Chromium to see if I can get somebody familiar with those layers to take a look.