Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0378dfedf7b50590fa8309aef54da27002e6bb9f https://github.com/WebKit/WebKit/commit/0378dfedf7b50590fa8309aef54da27002e6bb9f Author: Tyler Wilcock <tyle...@apple.com> Date: 2025-05-08 (Thu, 08 May 2025)
Changed paths: M Source/WebCore/accessibility/AXCoreObject.h M Source/WebCore/accessibility/AXLogger.cpp M Source/WebCore/accessibility/AccessibilityObject.cpp M Source/WebCore/accessibility/AccessibilityObject.h M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm Log Message: ----------- AX: Store AXIsolatedObject::{m_platformWidget, m_remoteParent} as properties to avoid paying the memory cost for them on every single object https://bugs.webkit.org/show_bug.cgi?id=292689 rdar://150887081 Reviewed by Joshua Hoffman. Only scroll views and attachments ever set AXIsolatedObject::{m_platformWidget, m_remoteParent}, but because they are member variables, we pay the cost for them on every single object. We can have hundreds of thousands of instances of this class, so that's a major cost. This commit turns these fields into AXProperty::PlatformWidget and AXProperty::RemoteParent. This commit also rearranges AXIsolatedObject's fields to be more compact, avoiding unnecessary padding. Prior to this commit, AXIsolatedObject was 136 bytes. Now it's 112 bytes. This saves 13.84mb on https://html.spec.whatwg.org, which has 567769 objects. * Source/WebCore/accessibility/AXCoreObject.h: * Source/WebCore/accessibility/AXLogger.cpp: (WebCore::operator<<): * Source/WebCore/accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::remoteParentObject const): Deleted. * Source/WebCore/accessibility/AccessibilityObject.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp: (WebCore::AXIsolatedObject::setProperty): (WebCore::AXIsolatedObject::platformWidget const): * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: * Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm: (WebCore::AXIsolatedObject::initializePlatformProperties): (WebCore::AXIsolatedObject::remoteParent const): (WebCore::AXIsolatedObject::remoteParentObject const): Deleted. * Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]): (scrollViewParent): Canonical link: https://commits.webkit.org/294666@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes