Bug 70009 - 16% of total time loading html5 spec (PerformanceTests/Parser/html5-full-render.html) is spent under updateWidgetIfNecessary
Summary: 16% of total time loading html5 spec (PerformanceTests/Parser/html5-full-rend...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on: 45049
Blocks: 68944
  Show dependency treegraph
 
Reported: 2011-10-13 01:53 PDT by Eric Seidel (no email)
Modified: 2013-01-29 19:19 PST (History)
11 users (show)

See Also:


Attachments
Patch (2.29 KB, patch)
2011-10-13 02:21 PDT, Eric Seidel (no email)
eric: review-
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2011-10-13 01:53:44 PDT
16% of total time loading html5 spec (PerformanceTests/Parser/html5-full-render.html) is spent under updateWidgetIfNecessary

Running (Self)		Symbol Name
4690.0ms   21.7%	 	             WebCore::HTMLConstructionSite::insertHTMLElement(WebCore::AtomicHTMLToken&)
4546.0ms   21.0%	 	              WTF::PassRefPtr<WebCore::Element> WebCore::HTMLConstructionSite::attach<WebCore::Element>(WebCore::ContainerNode*, WTF::PassRefPtr<WebCore::Element>)
4348.0ms   20.1%	 	               WebCore::Element::attach()
3491.0ms   16.1%	 	                WebCore::ContainerNode::resumePostAttachCallbacks()
3486.0ms   16.1%	 	                 WebCore::ContainerNode::dispatchPostAttachCallbacks()
3485.0ms   16.1%	 	                  WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary()
3485.0ms   16.1%	 	                   WebCore::Document::updateStyleIfNeeded()
3485.0ms   16.1%	 	                    WebCore::Document::recalcStyle(WebCore::Node::StyleChange)

basically we're updating style more often than we need to due to *two* <object> tags in the spec.

Post attach-callbacks for the loss.
Comment 1 Eric Seidel (no email) 2011-10-13 02:21:47 PDT
Created attachment 110814 [details]
Patch
Comment 2 WebKit Review Bot 2011-10-13 03:07:59 PDT
Comment on attachment 110814 [details]
Patch

Attachment 110814 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10056165

New failing tests:
svg/custom/getsvgdocument.html
Comment 3 Simon Fraser (smfr) 2011-10-13 08:20:03 PDT
Comment on attachment 110814 [details]
Patch

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

> Source/WebCore/html/HTMLPlugInImageElement.cpp:171
>      if (!needsWidgetUpdate() || useFallbackContent() || isImageType())

Do any of these require that style has been updated?
Comment 4 Adam Barth 2011-10-13 11:37:27 PDT
> Do any of these require that style has been updated?

I asked Eric that last night and he said no.
Comment 5 Alexey Proskuryakov 2011-10-13 11:50:24 PDT
The test failure on EWS looks related to the change.
Comment 6 Eric Seidel (no email) 2011-10-13 11:58:34 PDT
Must be one of them.  I will revert the change.

I guess that's why I shouldn't write changes at 2am. :)
Comment 7 Adam Barth 2011-10-13 12:12:26 PDT
> I will revert the change.

The change never landed, as far as I can tell.
Comment 8 Eric Seidel (no email) 2011-10-18 15:18:32 PDT
Comment on attachment 110814 [details]
Patch

This patch can't work it seems.  I'm not sure what race the current code is depending on, but removing this style update will cause the load never to get kicked off for an <object> tag, and thus not correctly delay the onload event for the window, causing the getSVGDocument() test to fail.
Comment 9 Eric Seidel (no email) 2011-10-18 15:19:33 PDT
I spent some time investigating if I could disentangle the load from the renderer to no avail.  I'll come back to this, but after I finish NRWT.  This is part of the general idea of finally making display: none plugins load properly.