NEW 62590
REGRESSION(r82934-r83016): Non-parallel downloads of linked stylesheets with media attribute
https://bugs.webkit.org/show_bug.cgi?id=62590
Summary REGRESSION(r82934-r83016): Non-parallel downloads of linked stylesheets with ...
bran_johnson
Reported 2011-06-13 13:14:30 PDT
Created attachment 96996 [details] Reduced Test Case The WebKit nightly for Windows r82934 downloads linked stylesheets with a media attribute in parallel. The WebKit nightly for Windows r83016 does not download the linked stylesheets with media attributes in parallel. Steps to reproduce: 1. Open the Network panel of the Web Inspector. 2. Load the linked jsbin page or the attached reduced test case. 3. Note the stylesheet resources loaded from hang.nodester.com The hang.nodester.com server waits two seconds before sending a response. This makes it easy to see the stair-stepping pattern (on r83016 and on) indicating the browser is waiting for the previous stylesheet to download before downloading the next. In r82934, the stylesheets download in roughly the same amount of time. I looked at the changes (http://trac.webkit.org/?from=04%2F06%2F2011&daysback=1&changeset=on&wiki=on&update=Update), and the one that looks to me like it could have changed this behavior is <http://trac.webkit.org/changeset/82951>.
Attachments
Reduced Test Case (454 bytes, text/html)
2011-06-13 13:14 PDT, bran_johnson
no flags
Chrome Stable Network Panel Screenshot (59.74 KB, image/png)
2011-06-14 10:45 PDT, bran_johnson
no flags
bran_johnson
Comment 1 2011-06-13 13:19:50 PDT
Some additional test URLs: Link with no media and one with media="print": http://jsbin.com/akumi5 Link with no media and one with media="crazy" (non-existent media type): http://jsbin.com/akumi5
bran_johnson
Comment 2 2011-06-13 13:53:36 PDT
Oops, the "crazy" media type test case link should be http://jsbin.com/ukidu5
Alexey Proskuryakov
Comment 3 2011-06-13 17:08:58 PDT
Isn't it how it should work? Only one of these stylesheets needs to be downloaded quickly, as only one is going to be used for screen rendering. The rest can be fetched with lowest priority.
bran_johnson
Comment 4 2011-06-14 06:44:40 PDT
I agree that the stylesheets that will be used immediately for screen rendering should be downloaded quickly, but I don't believe the other stylesheets need to be downloaded serially. I tested with @media="screen" (http://jsbin.com/ibofa4) and with media queries that should immediately apply (http://jsbin.com/ixemu4). In both tests, the stylesheets to be immediately used were downloaded in parallel. That's good. However, going back to the original test case (http://jsbin.com/ajigu4 or attachment 96996 [details]) with media queries for smaller window sizes, even after the "large" stylesheet (which will be immediately used for screen rendering) has downloaded, why are the other two stylesheets downloaded serially even when they are the only remaining resources to be downloaded and the only resources to be downloaded from hang.nodester.com? In Aurora 6.0a2(2011-06-13), Firefox 4.0.1, Opera 11.11, Opera 11.50 beta (build 1040), and WebKit prior to and including r82934, the stylesheets download in parallel, with the load event firing usually around 2 seconds. In WebKit revision 83016 and on, the load event fires around 7 seconds.
Alexey Proskuryakov
Comment 5 2011-06-14 09:10:44 PDT
Yes, that sounds wrong to me. It might be just an artifact of Web Inspector network panel, which is largely broken now (see bug 53828).
bran_johnson
Comment 6 2011-06-14 10:45:00 PDT
Created attachment 97138 [details] Chrome Stable Network Panel Screenshot I don't think it's a Web Inspector artifact (specifically bug 53828), as Chrome stable (12.0.742.91) shows that the stylesheets are non being downloaded in parallel. The attached screenshot shows Chrome's Network panel after loading attachment 96996 [details]. It doesn't display the resources starting to download at the same time like bug 53828.
Tony Gentilcore
Comment 7 2012-04-19 11:10:32 PDT
Looks like this bug still exists. Fixing it could be a nice page load time win for some sites.
Note You need to log in before you can comment on or make changes to this bug.