[Webkit-unassigned] [Bug 31356] New: XHR block even though per-host connection pool isn't full
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 11 09:07:43 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31356
Summary: XHR block even though per-host connection pool isn't
full
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.6
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Page Loading
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jonasw at roxen.com
Created an attachment (id=42967)
--> (https://bugs.webkit.org/attachment.cgi?id=42967)
Test case consisting of HTML code and a Roxen Webserver module for sleeping.
Safari keeps a per-host connection pool to avoid overloading servers with too
many connections in parallel. The pool also ensures that requests of different
kinds (stylesheets, images etc) are scheduled with appropriate priority and
that the page load completes as quickly as possible. However, XMLHttpRequests
(XHRs) don't seem to benefit from this infrastructure. A web page that keeps a
request open for a long time (imagine a polling request that restarts every 30
seconds) can block other XHRs that the web page expects to complete
immediately.
The attached test case shows this in action. It will require server-side code
that sleeps for a specified number of seconds to be functional; I'm supplying
code for Roxen Webserver, though the same behavior should be possible to
duplicate in any other server environment.
When running the attached code there will be 30 requests queued with a minimal
delay in between. 29 of them will ask the server to return data after a
1-second delay, but the 30th request will sleep for 15 seconds. One can then
observe that the 15-second delay in most cases will block one or more of the
shortlived requests from completing as soon as possible. If run in Firefox the
test case works as expected.
The JavaScript code in sleep.html can also be modified to show that scheduling
of parallel requests works fine when the page inserts <img> tags instead of
XHR. To do this, disable the xhr_box() call and enable the img_box() call.
I've found bug 26496 which appears to be similar, but since I'm seeing the
problem in a pretty fresh nightly (r50499) on 10.6.2 I'm opening a new report.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list