| Summary: | AX: Do not re-create the entire relations map every time a relation attribute changes. | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Andres Gonzalez <andresg_22> | ||||||||||
| Component: | Accessibility | Assignee: | 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
Andres Gonzalez
2023-01-06 14:37:18 PST
Created attachment 464382 [details]
Patch
Created attachment 464426 [details]
Patch
Created attachment 464451 [details]
Patch
Comment on attachment 464451 [details]
Patch
thanks Andres!
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 (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! Created attachment 464459 [details]
Patch
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]. |