Bug 139651

Summary: Lazily recompute the nonFastScrollableRegion
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser, thorton, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Simon Fraser (smfr) 2014-12-15 13:53:50 PST
Profiling cssom/non-subpixel-scroll-top-left-values.html is very slow on Yosemite in debug shows 25% of time under:

Running Time	Self		Symbol Name
2310.0ms   28.0%	0.0	                           WebCore::Element::setInnerHTML(WTF::String const&, int&)
2281.0ms   27.7%	0.0	                            WebCore::replaceChildrenWithFragment(WebCore::ContainerNode&, WTF::PassRefPtr<WebCore::DocumentFragment>, int&)
2279.0ms   27.7%	0.0	                             WebCore::ContainerNode::removeChildren()
2277.0ms   27.6%	0.0	                              WebCore::ContainerNode::removeBetween(WebCore::Node*, WebCore::Node*, WebCore::Node&)
2277.0ms   27.6%	0.0	                               WebCore::destroyRenderTreeIfNeeded(WebCore::Node&)
2276.0ms   27.6%	0.0	                                WebCore::Style::detachRenderTree(WebCore::Element&)
2276.0ms   27.6%	0.0	                                 WebCore::Style::detachRenderTree(WebCore::Element&, WebCore::Style::DetachType)
2228.0ms   27.1%	0.0	                                  WebCore::RenderObject::destroyAndCleanupAnonymousWrappers()
2228.0ms   27.1%	0.0	                                   WebCore::RenderObject::destroy()
2220.0ms   27.0%	0.0	                                    WebCore::RenderBlockFlow::willBeDestroyed()
2220.0ms   27.0%	0.0	                                     WebCore::RenderBoxModelObject::willBeDestroyed()
2220.0ms   27.0%	0.0	                                      WebCore::RenderElement::willBeDestroyed()
2220.0ms   27.0%	0.0	                                       WebCore::RenderObject::willBeDestroyed()
2195.0ms   26.6%	0.0	                                        WebCore::RenderLayerModelObject::destroyLayer()
2195.0ms   26.6%	0.0	                                         WebCore::RenderLayer::~RenderLayer()
2193.0ms   26.6%	0.0	                                          WebCore::RenderLayer::~RenderLayer()
2193.0ms   26.6%	0.0	                                           WebCore::RenderLayer::~RenderLayer()
2120.0ms   25.7%	0.0	                                            WebCore::FrameView::removeScrollableArea(WebCore::ScrollableArea*)
2118.0ms   25.7%	0.0	                                             WebCore::FrameView::scrollableAreaSetChanged()
2118.0ms   25.7%	0.0	                                              WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged(WebCore::FrameView*)
2113.0ms   25.7%	4.0	                                               WebCore::ScrollingCoordinator::computeNonFastScrollableRegion(WebCore::Frame const*, WebCore::IntPoint const&) const
1543.0ms   18.7%	5.0	                                                WebCore::Region::unite(WebCore::Region const&)
1356.0ms   16.4%	2.0	                                                 WebCore::Region::Shape::unionShapes(WebCore::Region::Shape const&, WebCore::Region::Shape const&)
1351.0ms   16.4%	15.0	                                                  WebCore::Region::Shape WebCore::Region::Shape::shapeOperation<WebCore::Region::Shape::UnionOperation>(WebCore::Region::Shape const&, WebCore::Region::Shape const&)
658.0ms    8.0%	4.0	                                                   WebCore::Region::Shape::appendSpan(int, int const*, int const*)

We should compute this region lazily.
Comment 1 Simon Fraser (smfr) 2015-05-01 15:37:32 PDT
Fixed in r182346.