[Webkit-unassigned] [Bug 122313] New: FocusController::advanceFocus spends a lot of time in HTMLMapElement::imageElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 3 21:04:06 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=122313

           Summary: FocusController::advanceFocus spends a lot of time in
                    HTMLMapElement::imageElement
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Keywords: InRadar
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: darin at apple.com, ap at webkit.org, koivisto at iki.fi,
                    benjamin at webkit.org, akling at apple.com,
                    psolanki at apple.com


On a web page with lots of map/area elements, we end up spending a lot of time inside HTMLMapElement::imageElement because the HTMLCollection used to traverse through image elements isn't cached, resulting in O(n^2) time complexity.

Running Time    Self        Symbol Name
7711.0ms  100.0%    0.0                               WebKit::handleKeyEvent(WebKit::WebKeyboardEvent const&, WebCore::Page*)
7711.0ms  100.0%    0.0                                WebCore::EventHandler::keyEvent(WebCore::PlatformKeyboardEvent const&)
7711.0ms  100.0%    0.0                                 WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, int&)
7711.0ms  100.0%    0.0                                  WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>)
7711.0ms  100.0%    0.0                                   WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::EventDispatchMediator>)
7711.0ms  100.0%    0.0                                    WebCore::EventDispatchMediator::dispatchEvent(WebCore::EventDispatcher*) const
7711.0ms  100.0%    0.0                                     WebCore::EventDispatcher::dispatch()
7711.0ms  100.0%    0.0                                      WebCore::EventDispatcher::dispatchEventPostProcess(void*)
7711.0ms  100.0%    0.0                                       WebCore::HTMLInputElement::defaultEventHandler(WebCore::Event*)
7711.0ms  100.0%    0.0                                        WebCore::Node::defaultEventHandler(WebCore::Event*)
7711.0ms  100.0%    0.0                                         WebCore::EventHandler::defaultKeyboardEventHandler(WebCore::KeyboardEvent*)
7711.0ms  100.0%    0.0                                          WebCore::FocusController::advanceFocus(WebCore::FocusDirection, WebCore::KeyboardEvent*, bool)
7711.0ms  100.0%    0.0                                           WebCore::FocusController::advanceFocusInDocumentOrder(WebCore::FocusDirection, WebCore::KeyboardEvent*, bool)
7711.0ms  100.0%    0.0                                            WebCore::FocusController::findFocusableElementAcrossFocusScope(WebCore::FocusDirection, WebCore::FocusNavigationScope, WebCore::Node*, WebCore::KeyboardEvent*)
7711.0ms  100.0%    0.0                                             WebCore::FocusController::findFocusableElementRecursively(WebCore::FocusDirection, WebCore::FocusNavigationScope, WebCore::Node*, WebCore::KeyboardEvent*)
7711.0ms  100.0%    0.0                                              WebCore::FocusController::nextFocusableElement(WebCore::FocusNavigationScope, WebCore::Node*, WebCore::KeyboardEvent*)
7711.0ms  100.0%    0.0                                               WebCore::FocusController::findElementWithExactTabIndex(WebCore::Node*, int, WebCore::KeyboardEvent*, WebCore::FocusDirection)
7711.0ms  100.0%    0.0                                                WebCore::HTMLAreaElement::isKeyboardFocusable(WebCore::KeyboardEvent*) const
7711.0ms  100.0%    1.0                                                 WebCore::HTMLAreaElement::isFocusable() const
7710.0ms   99.9%    0.0                                                  WebCore::HTMLMapElement::imageElement()
7683.0ms   99.6%    0.0                                                   WebCore::LiveNodeListBase::item(unsigned int) const

<rdar://problem/14920728>

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list