Bug 111117 - REGRESSION(r144318) 1-7% perf. regression on SVG/SvgHitTesting
Summary: REGRESSION(r144318) 1-7% perf. regression on SVG/SvgHitTesting
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-28 14:59 PST by Ryosuke Niwa
Modified: 2013-03-01 12:48 PST (History)
10 users (show)

See Also:


Attachments
Patch (4.19 KB, patch)
2013-03-01 08:02 PST, Dave Hyatt
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Dave Hyatt 2013-02-28 15:38:01 PST
Looking into it. Will take me a bit to get a good build to profile with. I eyeballed the code and really don't see any explanation for it.
Comment 2 Dave Hyatt 2013-02-28 19:51:30 PST
I think this is just because of allocating the Vector of LayerFragments to be way too big. Narrowing it to a size of 1 seems to get the bulk of the time back. Patch coming soon.
Comment 3 Dave Hyatt 2013-03-01 08:02:58 PST
Created attachment 190969 [details]
Patch
Comment 4 Andreas Kling 2013-03-01 08:20:16 PST
Comment on attachment 190969 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190969&action=review

r=me

> Source/WebCore/ChangeLog:7
> +        Make sure the allocated vector has a capacity of 1, since that is
> +        far and away the most common case.

You could go higher than 1 if you wanted to, since these are always on the stack anyway.
Comment 5 Stephen Chenney 2013-03-01 08:23:07 PST
Comment on attachment 190969 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190969&action=review

> Source/WebCore/rendering/RenderFlowThread.h:43
> +typedef Vector<LayerFragment, 1> LayerFragments;

I presume that all the compilers can correctly handle the multiple identical declarations of LayerFragments that will occur when this header and RenderLayer.h are included in the same source file. To be safe, let's let it run through EWS on all platforms first.
Comment 6 Dave Hyatt 2013-03-01 12:48:27 PST
Fixed in r144484.
Comment 7 Dave Hyatt 2013-03-01 12:48:51 PST
I believe this was the cause of the slowdown. We can re-open if this isn't good enough.