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
{{ message }}
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
accordions do not await on their content, since it is not visible
tabs only await the visible tab, and not all of them
Furthermore, we can probably explicitly delay the rest of the "hidden" elements decoration by using one of following options:
defer the decoration to the end of the event thread via setTimeout, so we offset the load on the main rendering thread for the rest of the phase
defer the decoration until the element is actually in the viewport, using an intersection observer
defer the decoration until the element gets keyboard focus or has the mouse over it, so we can load and decorate hopefully in time before the user clicks the tab/accordion to avoid a flash of content
The text was updated successfully, but these errors were encountered:
The page https://main--delta--hlxsites.hlx.page/us/en/skymiles/how-to-earn-miles/skymiles-partners-offers has relatively bad performance compared to the rest of the Franklin pages. The cause seems to be mainly that the async blocks we use (accordion + tabs)
await
all the content load and decoration before returning from thedecorate
method.Ideally, we should refactor the code so that:
await
on their content, since it is not visibleawait
the visible tab, and not all of themFurthermore, we can probably explicitly delay the rest of the "hidden" elements decoration by using one of following options:
setTimeout
, so we offset the load on the main rendering thread for the rest of the phaseThe text was updated successfully, but these errors were encountered: