RESOLVED FIXED 253752
AX: -[WebAccessibilityObjectWrapperMac attachmentView] should only be called when needed
https://bugs.webkit.org/show_bug.cgi?id=253752
Summary AX: -[WebAccessibilityObjectWrapperMac attachmentView] should only be called ...
Tyler Wilcock
Reported 2023-03-10 19:40:49 PST
There are several places where we repeat calls to -[WebAccessibilityObjectWrapperMac attachmentView] in close succession rather than storing the attachment view in a local variable and re-using it. This is wasteful in ITM as each call requires a separate, synchronous round-trip to the main-thread.
Attachments
Patch (8.71 KB, patch)
2023-03-10 19:49 PST, Tyler Wilcock
no flags
Patch (8.61 KB, patch)
2023-03-10 20:04 PST, Tyler Wilcock
no flags
Radar WebKit Bug Importer
Comment 1 2023-03-10 19:40:59 PST
Tyler Wilcock
Comment 2 2023-03-10 19:49:59 PST
chris fleizach
Comment 3 2023-03-10 19:56:37 PST
Comment on attachment 465390 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=465390&action=review > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3830 > + } I think we can get rid of the isAttschment variable and just use whether attachmentView is nil AddObject: attachmentView ?: wrapper
Tyler Wilcock
Comment 4 2023-03-10 20:04:30 PST
Tyler Wilcock
Comment 5 2023-03-10 20:05:10 PST
(In reply to chris fleizach from comment #3) > Comment on attachment 465390 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=465390&action=review > > > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3830 > > + } > > I think we can get rid of the isAttschment variable and just use whether > attachmentView is nil > > AddObject: attachmentView ?: wrapper Good point, thanks! Fixed in latest patch.
EWS
Comment 6 2023-03-13 10:20:43 PDT
commit-queue failed to commit attachment 465391 [details] to WebKit repository. To retry, please set cq+ flag again.
Andres Gonzalez
Comment 7 2023-03-14 08:04:40 PDT
(In reply to Tyler Wilcock from comment #4) > Created attachment 465391 [details] > Patch Would it make sense to get rid of isAttachment() and just have a attachmentView() that returns nil when it is not an attachment?
Tyler Wilcock
Comment 8 2023-03-14 10:02:58 PDT
(In reply to Andres Gonzalez from comment #7) > (In reply to Tyler Wilcock from comment #4) > > Created attachment 465391 [details] > > Patch > > Would it make sense to get rid of isAttachment() and just have a > attachmentView() that returns nil when it is not an attachment? Yes, that's a good idea! Will put on my to-do list for a future patch.
EWS
Comment 9 2023-03-14 11:12:32 PDT
Committed 261641@main (f238a7ef7870): <https://commits.webkit.org/261641@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 465391 [details].
Note You need to log in before you can comment on or make changes to this bug.