Title: [274707] trunk/Source/WebKit
Revision
274707
Author
[email protected]
Date
2021-03-19 02:06:52 -0700 (Fri, 19 Mar 2021)

Log Message

Reduce the number of allowed parallel low priority resource loads before visual completion
https://bugs.webkit.org/show_bug.cgi?id=223448

Reviewed by Geoff Garen.

More aggressive scheduling during early page load seems like a win.

* NetworkProcess/NetworkLoadScheduler.cpp:

Reduce from six to two.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):

This revealed an issue where allowing scheduling for synchronous XHR can end up in a deadlock
(since the web process won't be able to process redirect requests).

Tested by imported/w3c/web-platform-tests/xhr/responsexml-document-properties.htm.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (274706 => 274707)


--- trunk/Source/WebKit/ChangeLog	2021-03-19 08:27:47 UTC (rev 274706)
+++ trunk/Source/WebKit/ChangeLog	2021-03-19 09:06:52 UTC (rev 274707)
@@ -1 +1,22 @@
+2021-03-19  Antti Koivisto  <[email protected]>
+
+        Reduce the number of allowed parallel low priority resource loads before visual completion
+        https://bugs.webkit.org/show_bug.cgi?id=223448
+
+        Reviewed by Geoff Garen.
+
+        More aggressive scheduling during early page load seems like a win.
+
+        * NetworkProcess/NetworkLoadScheduler.cpp:
+        
+        Reduce from six to two.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::startNetworkLoad):
+
+        This revealed an issue where allowing scheduling for synchronous XHR can end up in a deadlock
+        (since the web process won't be able to process redirect requests).
+        
+        Tested by imported/w3c/web-platform-tests/xhr/responsexml-document-properties.htm.
+
 == Rolled over to ChangeLog-2021-03-18 ==

Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoadScheduler.cpp (274706 => 274707)


--- trunk/Source/WebKit/NetworkProcess/NetworkLoadScheduler.cpp	2021-03-19 08:27:47 UTC (rev 274706)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoadScheduler.cpp	2021-03-19 09:06:52 UTC (rev 274707)
@@ -31,7 +31,7 @@
 
 namespace WebKit {
 
-static constexpr size_t maximumActiveCountForLowPriority = 6;
+static constexpr size_t maximumActiveCountForLowPriority = 2;
 
 class NetworkLoadScheduler::HostContext {
     WTF_MAKE_FAST_ALLOCATED;

Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (274706 => 274707)


--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2021-03-19 08:27:47 UTC (rev 274706)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2021-03-19 09:06:52 UTC (rev 274707)
@@ -336,7 +336,11 @@
     parameters.request = WTFMove(request);
     parameters.isNavigatingToAppBoundDomain = m_parameters.isNavigatingToAppBoundDomain;
     m_networkLoad = makeUnique<NetworkLoad>(*this, &networkSession->blobRegistry(), WTFMove(parameters), *networkSession);
-    m_networkLoad->startWithScheduling();
+    
+    if (isSynchronous())
+        m_networkLoad->start();
+    else
+        m_networkLoad->startWithScheduling();
 
     RELEASE_LOG_IF_ALLOWED("startNetworkLoad: Going to the network (description=%" PUBLIC_LOG_STRING ")", m_networkLoad->description().utf8().data());
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to