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
When the page load for the first time, all the data needed for rendering are written as JSON inside the data-page attribute.
From what I have been able to test, if this data is relatively big (like 1000 chars), it could make the DOM parsing significantly slower, triggering bad performance, increasing the FCP in almost 3 seconds.
I propose, instead of loading the data in the data-page attribute, fetch the data as a new XHR request, as the subsequent page visits are.
I know the backend (probably) must handle the same exact request twice, but we can control the backend processing speed and power, but not the frontend.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When the page load for the first time, all the data needed for rendering are written as JSON inside the
data-page
attribute.From what I have been able to test, if this data is relatively big (like 1000 chars), it could make the DOM parsing significantly slower, triggering bad performance, increasing the FCP in almost 3 seconds.
I propose, instead of loading the data in the
data-page
attribute, fetch the data as a new XHR request, as the subsequent page visits are.I know the backend (probably) must handle the same exact request twice, but we can control the backend processing speed and power, but not the frontend.
Beta Was this translation helpful? Give feedback.
All reactions