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.
<rdar://problem/16877802>
Created attachment 231244 [details] patch
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?
(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
Created attachment 231246 [details] patch
http://trac.webkit.org/changeset/168593