[webkit-changes] [WebKit/WebKit] 189e31: AX: AccessibilityRole is 3 bytes too large, wastin...

Tyler Wilcock noreply at github.com
Tue May 7 20:56:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 189e31a68cec1731ca0e74da669bc3b17011a9a1
      https://github.com/WebKit/WebKit/commit/189e31a68cec1731ca0e74da669bc3b17011a9a1
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/atspi/AccessibilityAtspi.h

  Log Message:
  -----------
  AX: AccessibilityRole is 3 bytes too large, wasting memory
https://bugs.webkit.org/show_bug.cgi?id=273786
rdar://problem/127616693

Reviewed by Chris Fleizach.

AccessibilityRole is stored as a member variable on AccessibilityObject (m_role) and AccessibilityNodeObject (m_ariaRole),
and the average web page has lots of these objects. This patch resizes it from 4 bytes (the default enum class type is int)
down to 1 byte. This saves ~3.4mb on http://html.spec.whatwg.org (567769 objects * 6 bytes saved each).

* Source/WebCore/accessibility/AXCoreObject.h:
* Source/WebCore/accessibility/atspi/AccessibilityAtspi.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list