Bug 250234

Summary: AX: Do not re-create the entire relations map every time a relation attribute changes.
Product: WebKit Reporter: Andres Gonzalez <andresg_22>
Component: AccessibilityAssignee: Andres Gonzalez <andresg_22>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Andres Gonzalez
Reported 2023-01-06 14:37:18 PST
This may have a significant performance impact.
Attachments
Patch (8.58 KB, patch)
2023-01-06 14:42 PST, Andres Gonzalez
no flags
Patch (8.58 KB, patch)
2023-01-09 14:45 PST, Andres Gonzalez
no flags
Patch (9.12 KB, patch)
2023-01-10 18:07 PST, Andres Gonzalez
no flags
Patch (9.02 KB, patch)
2023-01-11 16:45 PST, Andres Gonzalez
no flags
Radar WebKit Bug Importer
Comment 1 2023-01-06 14:37:30 PST
Andres Gonzalez
Comment 2 2023-01-06 14:42:01 PST
Andres Gonzalez
Comment 3 2023-01-09 14:45:26 PST
Andres Gonzalez
Comment 4 2023-01-10 18:07:07 PST
chris fleizach
Comment 5 2023-01-10 22:58:16 PST
Comment on attachment 464451 [details] Patch thanks Andres!
chris fleizach
Comment 6 2023-01-10 22:59:19 PST
Comment on attachment 464451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=464451&action=review > Source/WebCore/accessibility/AXObjectCache.cpp:4083 > + for (AXID targetID : targetIDs) this could be auto targetID : targetIDs > Source/WebCore/accessibility/AXObjectCache.cpp:4156 > + for (size_t i = 0; i < ids.size(); ++i) { you could store ids.size() outside the loop so it doesn't have to be called each time in the loop
Andres Gonzalez
Comment 7 2023-01-11 05:52:53 PST
(In reply to chris fleizach from comment #6) > Comment on attachment 464451 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=464451&action=review > > > Source/WebCore/accessibility/AXObjectCache.cpp:4083 > > + for (AXID targetID : targetIDs) > > this could be > auto targetID : targetIDs > > > Source/WebCore/accessibility/AXObjectCache.cpp:4156 > > + for (size_t i = 0; i < ids.size(); ++i) { > > you could store ids.size() outside the loop so it doesn't have to be called > each time in the loop It is an inline for Vector and most std-like collections, so there is no harm. Thanks!
Andres Gonzalez
Comment 8 2023-01-11 16:45:29 PST
EWS
Comment 9 2023-01-11 19:05:47 PST
Committed 258816@main (278013ba2274): <https://commits.webkit.org/258816@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 464459 [details].
Note You need to log in before you can comment on or make changes to this bug.