Bug 136199

Summary: Remove scheduling code from network process
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, beidson, bunhere, cdumez, commit-queue, gyuyoung.kim, psolanki, rakuco, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch none

Description Antti Koivisto 2014-08-24 08:30:39 PDT
It is not really used.
Comment 1 Antti Koivisto 2014-08-24 08:35:06 PDT
Created attachment 237045 [details]
patch
Comment 2 Antti Koivisto 2014-08-24 11:21:51 PDT
Created attachment 237047 [details]
patch
Comment 3 Darin Adler 2014-08-24 12:42:13 PDT
Comment on attachment 237047 [details]
patch

OK. Good to delete this if it’s not being used. But here’s hoping we do these kinds of optimizations as appropriate in the networking layers.
Comment 4 Antti Koivisto 2014-08-24 14:21:18 PDT
Hmm, maybe we can't do this yet. NSURLRequest priorities have some bugs that cause problems in releases prior to Yosemite and so haven't been enabled. If we don't do prioritization ourselves then performance may suffer. :(
Comment 5 Alexey Proskuryakov 2014-08-24 15:24:59 PDT
So we don't do any of the prioritization in WebProcess? If so, how do we reprioritize in NetworkProcess?
Comment 6 Antti Koivisto 2014-08-24 21:50:39 PDT
In network process mode the web process side ResourceLoadScheduler is just a dumb proxy (WebKit::WebResourceLoadScheduler overrides the WebCore implementation). The actual priority-based scheduling is done by this copy code that I was trying to get rid of (NetworkResourceLoadScheduler) when the networking layer priorities are not supported.
Comment 7 Antti Koivisto 2014-08-25 10:50:59 PDT
Turns out that the network process scheduling code is never really used. Scheduling requires priority but making the requests we do  

void WebResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader, CachedResource* resource, ResourceLoadPriority priority, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
{
    ASSERT(resourceLoader);
    ASSERT(priority != ResourceLoadPriorityUnresolved);
    priority = ResourceLoadPriorityHighest;

(the priorities that we tell to CFNetwork are part of ResourceRequest and are not affected by this)

This mean the network process scheduling has never really been used and we can remove it without risking regressions.
Comment 8 Antti Koivisto 2014-08-25 11:05:12 PDT
https://trac.webkit.org/r172927