Bug 62480

Summary: WebKit2: improve first page load speed by adding API to launch WebProcess earlier
Product: WebKit Reporter: Stephanie Lewis <slewis>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: slewis
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Macintosh   
OS: OS X 10.6   
Attachments:
Description Flags
patch
sam: review-
patch sam: review+

Description Stephanie Lewis 2011-06-10 14:46:40 PDT
The first page load takes longer on WebKit2 because we have to wait for the WebProcess to launch.  Add API to launch it preemptively if we'd like.
Comment 1 Stephanie Lewis 2011-06-10 14:49:58 PDT
Created attachment 96793 [details]
patch
Comment 2 Sam Weinig 2011-06-10 18:15:53 PDT
Comment on attachment 96793 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=96793&action=review

> Source/WebKit2/UIProcess/API/C/WKContext.cpp:104
> +    toImpl(contextRef)->ensureWebProcess();

This should call a function on WebContext that matches the suffix of the API function call and the logic should be in WebContext.

> Source/WebKit2/UIProcess/API/C/WKContext.h:116
> +WK_EXPORT void WKContextLaunchInjectedBundle(WKContextRef context);

This isn't a good name for this.  How about WKContextWarmInitialProcess(...).  I also think this should go in WKContextPrivate.h
Comment 3 Stephanie Lewis 2011-06-10 19:17:10 PDT
Created attachment 96836 [details]
patch
Comment 4 Stephanie Lewis 2011-06-11 13:32:58 PDT
committed  http://trac.webkit.org/projects/webkit/changeset/88607
Comment 5 Stephanie Lewis 2011-06-11 13:35:19 PDT
<rdar://problem/9593960>