Bug 23665

Summary: WebHTMLView.mm removes NSNotification observation inefficiently
Product: WebKit Reporter: John Sullivan <sullivan>
Component: WebKit Misc.Assignee: John Sullivan <sullivan>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch to use removeObserver efficiently darin: review+

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.