In http://trac.webkit.org/changeset/180768 we added an observer to track visibility of the NSFontPanel to ensure we could fetch the font information for the current selection when the panel first became visible. It turns out that adding the observer requires the shared font panel object to be created. That is apparently a very expensive operation that is regressing the initialization time for the WKWebView. We should do that lazily. rdar://problem/20233711
Created attachment 249518 [details] Patch
Comment on attachment 249518 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249518&action=review > Source/WebKit2/UIProcess/API/mac/WKView.mm:2622 > + [[NSFontPanel sharedFontPanel] addObserver:self forKeyPath:@"visible" options:NSKeyValueObservingOptionNew context:nil]; I don't think you need NSKeyValueObservingOptionNew unless you actually get it from the dictionary in your observe method. Also you need to specify a context. Just add something like static void* wkViewObservationContext = &wkViewObservationContext; and pass that in add and remove. You also need to compare the context in your observe method.
Created attachment 249524 [details] Patch2 New patch that includes feedback from Anders.
Comment on attachment 249524 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=249524&action=review > Source/WebKit2/UIProcess/API/mac/WKView.mm:3728 > + NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate; Please disregard this line. I had to update ToT.
Committed revision 182037.