Amphtml: PWA Shell APIs and AMP performance measurements

Created on 16 Aug 2017  路  15Comments  路  Source: ampproject/amphtml

Basically, given our current model for 1st impression w/o service workers, how fast can we render an ampdoc in shadow doc comparing to somehow server-side rendering an equivalent doc within the shell and comparing it with HTTP2 push and Link preload instructions.

Performance will need to be measured across the four strategies. We need to measure the following three values for each:

  1. Shell is ready
  2. Ampdoc render-start
  3. Ampdoc ini-load

e.g.:

| Event | A: old-style shell+doc SSR | B: new-style shell+ampdoc in shadow root | C: new-style + HTTP2 push | D: new-style + link header |
|--|--|--|--|--|
| Shell is ready | | | | |
| Ampdoc render-start | | | | |
| Ampdoc ini-load | | | | |

The b,c,d are very easy to estimate with the code we have, I believe
But (a) is harder because we don't have comparable server-side rendering
So we need to find a way to estimate that case somehow.

Additional columns:
Streaming shadowdom
Non-streaming shadowdom
"hot" service worker shell

/to @cvializ
/cc @dvoytenko @pbakaus

PWA When Possible Stale DiscussioQuestion

All 15 comments

Would be good to see impact of streaming vs non-streaming the doc too.

I agree, would be good to have data on streaming vs non-streaming case. And while we are at it, also have a column with "hot" service worker shell.

@cvializ reading through the bug. Not sure old style shell / new style shell stand for. Can you help?

Sorry about that, this was copied from hand-written notes. I believe old-style here is a shell inserting ampdocs without shadow dom. New-style uses shadowdom.

@andreban, @cvializ is correct.The idea for "old style" is to remove shadow dom and simply stitch the doc inside the shell - obviously it may end up half broken and unusable, but it'd give us some data network-wise.

This is a high priority issue but it hasn't been updated in awhile. @andreban Do you have any updates?

I'm wondering if it makes sense to compare something like this as well: https://gist.github.com/andreban/ad5e41723e0532598b5add7145d974ba

The concept is to add the AMP content inside a template tag, and use the content of the tag as the ampDoc that will be loaded using amp-shadow. In terms of performance, this should be analog to H2 Pushing the AMP doc

@andreban In this case, I'd rather measure against H2/Link first. <template> is also interesting. But the big problem there (unless I'm mistaken) is that it can't have nested templates inside, in case AMP uses them too. E.g. this will be broken:

<template>
  <html>
    ...
    <amp-list>
      <template></template>  <!-- The top-level template will be closed here :( -->
    </amp-list>
  </html>
</tempate>

This is a high priority issue but it hasn't been updated in awhile. @andreban Do you have any updates?

This is a high priority issue but it hasn't been updated in awhile. @andreban Do you have any updates?

This is a high priority issue but it hasn't been updated in awhile. @andreban Do you have any updates?

This is a high priority issue but it hasn't been updated in awhile. @andreban Do you have any updates?

This is a high priority issue but it hasn't been updated in awhile. @andreban Do you have any updates?

This is a high priority issue but it hasn't been updated in awhile. @andreban Do you have any updates?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings