RESOLVED FIXED 132790
Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
https://bugs.webkit.org/show_bug.cgi?id=132790
Summary Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
Tim Horton
Reported 2014-05-10 16:53:29 PDT
This is a ~4.3% win on UI process total time (5%->0.7%) running http://www.kevs3d.co.uk/dev/canvasmark/, as predicted by https://bugs.webkit.org/show_bug.cgi?id=127085#c2.
Attachments
patch (1.65 KB, patch)
2014-05-10 20:15 PDT, Tim Horton
mitz: review+
patch (1.65 KB, patch)
2014-05-10 20:31 PDT, Tim Horton
mitz: review+
Radar WebKit Bug Importer
Comment 1 2014-05-10 16:53:47 PDT
Tim Horton
Comment 2 2014-05-10 20:15:27 PDT
mitz
Comment 3 2014-05-10 20:20:15 PDT
Comment on attachment 231244 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=231244&action=review > Source/WebKit2/UIProcess/ios/WKScrollView.mm:91 > + BOOL internalDelegateWillRespond = [_internalDelegate respondsToSelector:aSelector]; > + BOOL externalDelegateWillRespond = [_externalDelegate respondsToSelector:aSelector]; We could make things even faster by caching these for some or all selectors. > Source/WebKit2/UIProcess/ios/WKScrollView.mm:97 > + return self; The documentation for -forwardingTargetForSelector: says (Obviously if you return self from this method, the code would just fall into an infinite loop.) Why are you returning self?
Tim Horton
Comment 4 2014-05-10 20:24:22 PDT
(In reply to comment #3) > (From update of attachment 231244 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=231244&action=review > > > Source/WebKit2/UIProcess/ios/WKScrollView.mm:91 > > + BOOL internalDelegateWillRespond = [_internalDelegate respondsToSelector:aSelector]; > > + BOOL externalDelegateWillRespond = [_externalDelegate respondsToSelector:aSelector]; > > We could make things even faster by caching these for some or all selectors. > > > Source/WebKit2/UIProcess/ios/WKScrollView.mm:97 > > + return self; > > The documentation for -forwardingTargetForSelector: says > (Obviously if you return self from this method, the code would just fall into an infinite loop.) > Why are you returning self? Ha! I missed that, and misunderstood the fallback case. Also that suggests to me that we never run into this case, because I haven't seen any infinite loops yet today :D
Tim Horton
Comment 5 2014-05-10 20:31:18 PDT
Tim Horton
Comment 6 2014-05-10 20:33:25 PDT
Note You need to log in before you can comment on or make changes to this bug.