Cache some expensive AXIsolatedObject properties lazily.
<rdar://problem/88467667>
Created attachment 450850 [details] Patch
Comment on attachment 450850 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450850&action=review > Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:978 > +String AXIsolatedObject::getOrRetrieveStringPropertyValue(AXPropertyName propertyName) Get and retrieve seem like synonyms here so you could probably drop both and just call it stringPropertyValue() > Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:1009 > + setProperty(propertyName, value.isolatedCopy()); should we cache if the string is empty
(In reply to chris fleizach from comment #3) > Comment on attachment 450850 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=450850&action=review > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:978 > > +String AXIsolatedObject::getOrRetrieveStringPropertyValue(AXPropertyName propertyName) > > Get and retrieve seem like synonyms here so you could probably drop both and > just call it stringPropertyValue() The idea is to differentiate it from stringAttributeValue that I intend to rename stringPropertyValue. The getOrRetrieve makes explicit that the value is either gotten from the cache or retrieved from the main thread. The reason I'd like to rename stringAttributeValue -> stringPropertyValue is the confusing overload of "attribute" which is used for HTML element attributes, platform API methods, and AXCoreObject methods. > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:1009 > > + setProperty(propertyName, value.isolatedCopy()); > > should we cache if the string is empty I think so since that the behavior of the live object as well.
Comment on attachment 450850 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450850&action=review >>> Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:978 >>> +String AXIsolatedObject::getOrRetrieveStringPropertyValue(AXPropertyName propertyName) >> >> Get and retrieve seem like synonyms here so you could probably drop both and just call it stringPropertyValue() > > The idea is to differentiate it from stringAttributeValue that I intend to rename stringPropertyValue. The getOrRetrieve makes explicit that the value is either gotten from the cache or retrieved from the main thread. The reason I'd like to rename stringAttributeValue -> stringPropertyValue is the confusing overload of "attribute" which is used for HTML element attributes, platform API methods, and AXCoreObject methods. In this case maybe cachedStringPropertyValue would be good
Committed r289131 (246828@main): <https://commits.webkit.org/246828@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450850 [details].