[webkit-changes] [WebKit/WebKit] 98a283: AX: Pre-size AXIsolatedObject::m_propertyMap to av...

Tyler Wilcock noreply at github.com
Sat Dec 24 18:53:03 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 98a28389be81009e2d4470d70fd7869a726e549f
      https://github.com/WebKit/WebKit/commit/98a28389be81009e2d4470d70fd7869a726e549f
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2022-12-24 (Sat, 24 Dec 2022)

  Changed paths:
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h

  Log Message:
  -----------
  AX: Pre-size AXIsolatedObject::m_propertyMap to avoid unnecessary HashTable reallocations
https://bugs.webkit.org/show_bug.cgi?id=249873
rdar://problem/103687278

Reviewed by Chris Fleizach.

Use reserveInitialCapacity to give AXIsolatedObject::m_propertyMap an
initial size to help avoid unnecessary HashTable reallocations. These
HashTable reallocations showed up in `sample`s when using VoiceOver on
popular websites.

This patch also removes AXPropertyName::TagName since it's not used on
the Mac platform for any AX-client facing functionality (and Mac is the
only platform that enables isolated tree mode).

* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::AXIsolatedObject):
(WebCore::AXIsolatedObject::initializeProperties):
(WebCore::AXIsolatedObject::tagName const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:

Canonical link: https://commits.webkit.org/258328@main




More information about the webkit-changes mailing list