[webkit-dev] Making browsers faster: Resource Packages

Mike Belshe mike at belshe.com
Sun Nov 22 18:52:54 PST 2009


On Sat, Nov 21, 2009 at 3:00 PM, Steve Souders <steve at souders.org> wrote:

>  Here's my understanding of how this would work: In addition to the
> resource package LINK and the not-packaged stylesheet LINK, you still need
> LINKs for the other stylesheets. So the page could look like this:
>     <link rel="resource-package" href="pkg.zip">
>     <link rel="stylesheet" href="in-package-A.css">
>     <link rel="stylesheet" href="in-package-B.css">
>     <link rel="stylesheet" href="NOT-in-package-C.css">
>
> or this:
>     <link rel="resource-package" href="pkg.zip">
>     <link rel="stylesheet" href="NOT-in-package-C.css">
>      <link rel="stylesheet" href="in-package-A.css">
>     <link rel="stylesheet" href="in-package-B.css">
>
> Browsers probably shouldn't download any other resources until they've
> gotten the manifest.txt. In the first case, there isn't an extra RT
> (assuming in-package-A.css is the first file in the package), and the page
> should render faster, esp in IE < 7 (if all the resources are on the same
> domain). In the second case there, is an extra RT delay for painting.
> Presumably, "core" stylesheets are packaged and come first, and
> page-specific stylesheets aren't packaged and come last, so the first
> situation is more typical.
>

CSS and JS can't be declared in arbitrary orders.  So while your argument is
good (about when the extra RTT exists), in practice, it is not always an
option.  If there are 3 scripts, two which can't be bundled and one which
can, then you may or may not suffer the extra RT.

This is really subtle stuff -  web designers could think they are speeding
up their pages when they're slowing them down.  The tools need to prevent
that.  It can't be manual.

Mike




>
> -Steve
>
>
>
> Mike Belshe wrote:
>
> Alexander - when you do the testing on this, one case I'd really like to
> see results on is this:
>
>  Page contains a resource bundle, and the bundle contains a bunch of
> stylesheets, JS and other, but DOES NOT include one of the CSS files.
>  Immediately following the <link resource bundle>, put a reference to the
> style sheet not included in the bundle.
>
>  When the browser sees the link to the CSS, which is critical to the page
> download, does it wait for the resource bundle to load (I realize that
> technically it only needs to get the manifest)?  If not, it might download
> it twice (since it doesn't know the status of the bundle yet).
>
>  Now simulate over a 200ms RTT link.  I believe you've just added a full
> RT to get the CSS, which was critical for layout.  Overall PLT won't suffer
> the full RTT, but time-to-first-paint will.
>
>  Mike
>
>
> On Wed, Nov 18, 2009 at 3:57 PM, Peter Kasting <pkasting at google.com>wrote:
>
>>  On Wed, Nov 18, 2009 at 3:54 PM, Dirk Pranke <dpranke at chromium.org>wrote:
>>
>>> Another caching-related issue involves versioning of the archives. If
>>> version 2 of a zip contains only a few files modified since version 1,
>>> and I have version 1 cached, is there some way to take advantage of
>>> that?
>>
>>
>>  This is a specific case of my more general question, "One of your stated
>> goals is to avoid downloading resources you already have, but even with
>> manifests, I see no way to do this, since the client can't actually tell the
>> server 'only send items x, y, and z'."  This was the one point Alexander
>> didn't copy in his reply mail.
>>
>>  PK
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091122/35f1f773/attachment.html>


More information about the webkit-dev mailing list