Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Story Player] Optimize Story loading strategy #31220

Closed
gmajoulet opened this issue Nov 17, 2020 · 1 comment
Closed

[Story Player] Optimize Story loading strategy #31220

gmajoulet opened this issue Nov 17, 2020 · 1 comment

Comments

@gmajoulet
Copy link
Contributor

Objective

Improve LCP of the visible Story when using the show() method on the non first Story.
Calling show() to display the n-th story should be just as fast as displaying the first Story.

How

Loading a Story is using quite some bandwidth, and loading several at once introduces significant delays on the LCP of the visible one.
We should always:

  1. Load the visible story, and wait for storyContentLoaded event, then
  2. Load the N + 1 story with a prerender visibilitystate. No need to prerender the previous one until user tries swiping to it

cc @ampproject/wg-stories

@gmajoulet
Copy link
Contributor Author

Duplicate of #31212

@gmajoulet gmajoulet marked this as a duplicate of #31212 Nov 17, 2020
@gmajoulet gmajoulet assigned Enriqe and unassigned mszylkowski Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants