Bug 136199 - Remove scheduling code from network process
Summary: Remove scheduling code from network process
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2014-08-24 08:30 PDT by Antti Koivisto
Modified: 2014-08-25 11:05 PDT (History)
9 users (show)

See Also:

patch (38.41 KB, patch)
2014-08-24 08:35 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (38.94 KB, patch)
2014-08-24 11:21 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 Antti Koivisto 2014-08-24 11:21:51 PDT
Created attachment 237047 [details]
Comment 3 Darin Adler 2014-08-24 12:42:13 PDT
Comment on attachment 237047 [details]

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(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