RESOLVED FIXED 23665
WebHTMLView.mm removes NSNotification observation inefficiently
https://bugs.webkit.org/show_bug.cgi?id=23665
Summary WebHTMLView.mm removes NSNotification observation inefficiently
John Sullivan
Reported 2009-01-31 16:45:15 PST
-[WebHTMLView close] calls [NSNotificationCenter removeObserver:self], which is measurably slower than calling the flavor of removeObserver: that takes a specific notification. Also, removeObserver: is called when the view is removed from the window as well as when the view is closed, resulting in NSNotificationCenter looking through its tables of observer/notification pairs twice for the same pair.
Attachments
Patch to use removeObserver efficiently (12.52 KB, patch)
2009-01-31 16:47 PST, John Sullivan
darin: review+
John Sullivan
Comment 1 2009-01-31 16:47:31 PST
Created attachment 27225 [details] Patch to use removeObserver efficiently
Darin Adler
Comment 2 2009-01-31 16:49:56 PST
Comment on attachment 27225 [details] Patch to use removeObserver efficiently r=me
John Sullivan
Comment 3 2009-01-31 17:00:34 PST
Committed revision 40468
Note You need to log in before you can comment on or make changes to this bug.