Bug 105919 - Stylesheets that don't match current viewport etc. are no longer deferred
Summary: Stylesheets that don't match current viewport etc. are no longer deferred
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.8
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 04:47 PST by Andy Davies
Modified: 2013-04-08 15:31 PDT (History)
12 users (show)

See Also:


Attachments
Re-enabling the ResourceLoadScheduler (467 bytes, patch)
2013-01-06 08:03 PST, Yoav Weiss
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Davies 2013-01-02 04:47:58 PST
Previous versions of WebKit deferred loading stylesheets where the media query didn't match viewport, orientation etc.

This waterfall illustrates the behaviour in Chrome 23 - http://www.webpagetest.org/result/130102_CQ_0f4cca3d4aa1dff79941bb64eda548c9/1/details/ - where big.css is deferred, due to  media="screen and (min-width : 1200px)"

In Chrome 26, big.css is no longer deferred and so is competing for the network with other resources - http://www.webpagetest.org/result/130102_KJ_2079b3c622753c392584f48052d8a01c/1/details/

Also tested in r138591
Comment 1 Yoav Weiss 2013-01-06 08:03:31 PST
Created attachment 181459 [details]
Re-enabling the ResourceLoadScheduler

This issue started in the disabling of the ResourceLoadScheduler for Chromium at the git commit 46e22591a4adb6bb42530b2f52e4517cd3b226bf.
This patch reverses part of that commit.
The reasoning for disabling the renderer's load scheduler is explained at https://insouciant.org/tech/throttling-subresources-before-first-paint/ and in short it is destined to move resource scheduling out of the rendering engine and into the browser. Since Chrome's resource scheduling is not yet in place (at least as I can tell), this results in obvious performance regressions, especially when it comes to external CSS files that are not necessary for first paint.
Comment 2 Yoav Weiss 2013-01-06 14:16:45 PST
I've opened a slightly related bug regarding the PreloadScanner - https://bugs.webkit.org/show_bug.cgi?id=106198
Comment 3 Alexey Proskuryakov 2013-01-07 10:03:03 PST
From the analysis above, this looks like a chromium-only issue.
Comment 4 Andy Davies 2013-01-07 12:02:35 PST
I used webpagetest as it was the easiest way to provide waterfalls

I also tested in WebKit r138591 and Safari 6.0.2 (8536.26.17) - Safari behaves the same a Chrome 23, WebKit nightly behaves as Chrome 26

That's why I raised it against WebKit rather than Chromium
Comment 5 Adam Barth 2013-01-07 12:03:25 PST
This patch appears to be in the inverse of http://trac.webkit.org/changeset/129070

Perhaps you and simonjam should discuss this issue at bit.  :)
Comment 6 Adam Barth 2013-01-07 12:03:51 PST
Actually CC the folks from http://trac.webkit.org/changeset/129070
Comment 7 Adam Barth 2013-01-07 12:04:35 PST
> That's why I raised it against WebKit rather than Chromium

It's correct to raise this issue in bugs.webkit.org.  Alexey is just marking the bug as only affecting Chromium so that he can ignore it.  :)
Comment 8 Alexey Proskuryakov 2013-01-07 12:23:11 PST
> Safari behaves the same a Chrome 23, WebKit nightly behaves as Chrome 26

If it's also broken in nightlies, then perhaps we have multiple issues. A fix that changes REQUEST_MANAGEMENT_ENABLED for Chromium won't fix Safari nightlies.
Comment 9 James Simonsen 2013-01-07 16:57:33 PST
As Alexey says, it's really only an issue if WebKit nightlies are affected.

For Chrome, we have a browser based scheduler in the works and this bug doesn't affect stable or beta channel users.
Comment 10 WebKit Review Bot 2013-01-27 22:00:36 PST
Comment on attachment 181459 [details]
Re-enabling the ResourceLoadScheduler

Attachment 181459 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/16156460

New failing tests:
http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html
Comment 11 WebKit Review Bot 2013-01-27 22:58:34 PST
Comment on attachment 181459 [details]
Re-enabling the ResourceLoadScheduler

Attachment 181459 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/16150608

New failing tests:
http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html