🚀 [Story performance] Experiment to load first page assets before loading other pages to improve LCP#34846
Conversation
|
Hey @gmajoulet, @newmuis! These files were changed: |
1 similar comment
|
Hey @gmajoulet, @newmuis! These files were changed: |
gmajoulet
left a comment
There was a problem hiding this comment.
Can you launch this behind a CSI reported experiment so we can gather performance metrics?
|
@kristoferbaxter will remove the logs 👍 |
kristoferbaxter
left a comment
There was a problem hiding this comment.
Left a few comments, but let's also get @jridgewell or @erwinmombay to take a look.
Perhaps for some period of time asking @ampproject/wg-performance for reviews on performance related changes to the stories format would be prudent.
|
Can you clarify what you're measuring in the metrics you're posted? A LCP of 0.5s without any optimization is very very surprising to me |
jridgewell
left a comment
There was a problem hiding this comment.
It seems instead of "prealoding all" (parallel), it should just use serial preloading? Ie, prioritize based on distance.
|
Before moving forward here, as an additional verification can you provide a few runs (9 is likely ok) on WebPageTest of this diff on a midrange device? |
|
@kristoferbaxter thanks for the suggestion, didn't know about WebPageTest. Added the results to the PR description but here they are: LCP field data from WebPageTestLCP with change 10.09s |
|
@mszylkowski can you send a follow up PR to launch this to 10% plz? We can control further using the new instant experiment system later on once it's back, but for this one let's use the regular experiments. |
|
For reference: Launching experiment to 10% in #35192 |
In order to improve the Largest Contentful Paint which is the major failing component of the Core Web Vitals for stories, we can delay the loading of the assets (images, audios and videos) on the inactive pages until the active page (the first page that shows up when the story is loaded).
Since we use the

distanceattribute to determine what to load, following pages will not show up until the active page appears, or we navigate to another page.LCP lab data for this PR
LCP field data from WebPageTest
LCP with change 10.09s
LCP without change 11.07s