[prev in list] [next in list] [prev in thread] [next in thread] 

List:       webkit-dev
Subject:    Re: [webkit-dev] Making browsers faster: Resource Packages
From:       Mike Belshe <mike () belshe ! com>
Date:       2009-11-23 2:52:54
Message-ID: 2a10ed240911221852j71efb5en6ee90578be766386 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Sat, Nov 21, 2009 at 3:00 PM, Steve Souders <steve@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@google.com>wrote:
>
>>  On Wed, Nov 18, 2009 at 3:54 PM, Dirk Pranke <dpranke@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
>>
>
>

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Sat, Nov 21, 2009 at 3:00 PM, Steve Souders <span \
dir="ltr">&lt;<a href="mailto:steve@souders.org">steve@souders.org</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;">



  
  

<div bgcolor="#ffffff" text="#000000">
Here&#39;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:<br>
<tt>    &lt;link rel=&quot;resource-package&quot; href=&quot;pkg.zip&quot;&gt;<br>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;in-package-A.css&quot;&gt;<br>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;in-package-B.css&quot;&gt;<br>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;NOT-in-package-C.css&quot;&gt;<br>
</tt><br>
or this:<br>
<tt>    &lt;link rel=&quot;resource-package&quot; href=&quot;pkg.zip&quot;&gt;<br>
</tt><tt>    &lt;link rel=&quot;stylesheet&quot; \
href=&quot;NOT-in-package-C.css&quot;&gt;<br> </tt><tt>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;in-package-A.css&quot;&gt;<br>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;in-package-B.css&quot;&gt;<br>
</tt><br>
Browsers probably shouldn&#39;t download any other resources until they&#39;ve
gotten the manifest.txt. In the first case, there isn&#39;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 &lt; 7 (if all the resources are
on the same domain). In the second case there, is an extra RT delay for
painting. Presumably, &quot;core&quot; stylesheets are packaged and come first,
and page-specific stylesheets aren&#39;t packaged and come last, so the
first situation is more typical.<br></div></blockquote><div><br></div><div>CSS and JS \
can&#39;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&#39;t be bundled and one which can, then you may or may not \
suffer the extra RT.</div> <div><br></div><div>This is really subtle stuff -  web \
designers could think they are speeding up their pages when they&#39;re slowing them \
down.  The tools need to prevent that.  It can&#39;t be \
manual.</div><div><br>Mike</div> <div><br></div><div><br></div><div> \
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000"><font color="#888888"> \
                <br>
-Steve</font><div><div></div><div class="h5"><br>
<br>
<br>
Mike Belshe wrote:
<blockquote type="cite">Alexander - when you do the testing on this, one case I&#39;d
really like to see results on is this:
  <div><br>
  </div>
  <div>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 &lt;link resource bundle&gt;, put a
reference to the style sheet not included in the bundle.</div>
  <div><br>
  </div>
  <div>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&#39;t know the status of the
bundle yet).</div>
  <div><br>
  </div>
  <div>Now simulate over a 200ms RTT link.  I believe you&#39;ve just added
a full RT to get the CSS, which was critical for layout.  Overall PLT
won&#39;t suffer the full RTT, but time-to-first-paint will.</div>
  <div><br>
  </div>
  <div>Mike</div>
  <div><br>
  </div>
  <div><br>
  <div class="gmail_quote">On Wed, Nov 18, 2009 at 3:57 PM, Peter
Kasting <span dir="ltr">&lt;<a href="mailto:pkasting@google.com" \
target="_blank">pkasting@google.com</a>&gt;</span> wrote:<br>
  <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, \
204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">  <div class="gmail_quote">
    <div>On Wed, Nov 18, 2009 at 3:54 PM, Dirk Pranke <span dir="ltr">&lt;<a \
href="mailto:dpranke@chromium.org" \
target="_blank">dpranke@chromium.org</a>&gt;</span> wrote:<br>
    <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, \
204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">  <div>Another caching-related issue \
involves versioning of the archives. If</div>
version 2 of a zip contains only a few files modified since version 1,<br>
and I have version 1 cached, is there some way to take advantage of<br>
that?</blockquote>
    <div><br>
    </div>
    </div>
    <div>This is a specific case of my more general question, &quot;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&#39;t actually tell the server &#39;only send items x, y, and z&#39;.&quot;  This
was the one point Alexander didn&#39;t copy in his reply mail.</div>
    <div><br>
    </div>
    <font color="#888888">
    <div>PK</div>
    </font></div>
  </blockquote>
  </div>
  <br>
  </div>
</blockquote>
</div></div></div>

</blockquote></div><br>



_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic