You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the new feature or change to an existing feature you'd like to see
The player loads too many stories at once and there is code to optimize the loading for the first story, but if you start with the second Story it takes forever to load.
We need to change the logic from: load the current story as visible + 2 others as prerender
to: load the current story as visible, and once it's done, load the next one as prerender
Additional context
Publishers load a story using show()
in that show() method, there's this line that finds the adjascent stories
And this line will start the logic that will position + preload the stories
the story will prerender, or load, when you call this line here
it's gated behind navigationPromise that's a deferred that waits for the visible story to send its storyContentLoaded event
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:
Load the visible story, and wait for storyContentLoaded event, then
Load the N + 1 story with a prerender visibilitystate. No need to prerender the previous one until user tries swiping to it
Describe the new feature or change to an existing feature you'd like to see
The player loads too many stories at once and there is code to optimize the loading for the first story, but if you start with the second Story it takes forever to load.
We need to change the logic from:
load the current story as visible + 2 others as prerender
to:
load the current story as visible, and once it's done, load the next one as prerender
Additional context
Publishers load a story using show()
navigationPromise
that's adeferred
that waits for the visible story to send itsstoryContentLoaded
eventRelated to #31562, #31925
The text was updated successfully, but these errors were encountered: