It is not really used.
Created attachment 237045 [details]
Created attachment 237047 [details]
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.
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. :(
So we don't do any of the prioritization in WebProcess? If so, how do we reprioritize in NetworkProcess?
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.
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.