-
I was looking at Kent's site the other day to see how remix performs in some not-so-trivial site/blog. Results are great already, really, super happy this is happening! One thing that caught my attention is that some waterfall is still happening at the beginning. Before app chunks are loaded, they are waiting for fonts, some styles and polyfill.js costing around 500ms from my machine of waiting time. Further more I can see despite the Matter font blocking the loading of the rest of the UI, I still see it causing a rerender (if you load in 3g quality for slowmo). I am looking forward to the future where we could load a site with a custom font, loaded in a non-blocking way and without layout shifts 🎉 So, I am wondering if remix could have prevented these? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 12 replies
-
What you see there is no waterfall. It is queuing which is done by the browser. From Chrome's timing explanation:
The white bar is indicating this. EDIT: We are seeing the network waterfall diagram, but not the negative association of waterfalls, e.g. Network requests being dependent on each other. |
Beta Was this translation helpful? Give feedback.
-
@ccssmnn thank you for the info, super valuable! Didn't think http1 could be the issue !
|
Beta Was this translation helpful? Give feedback.
-
@ccssmnn Yeah, I was intuitively including only sequencial requests in "waterfall" terminology 🤣 |
Beta Was this translation helpful? Give feedback.
-
@ccssmnn in your screenshot from remix landing, everything is parallel, except of document, this is correct. In my screenshots you see Document => (fonts, stylesheets, polyfills ... 7 requests in total) => rest. I am saying that those 7 requests after the document are blocking the download of the rest. Not sure why you are not seeing it the same way. |
Beta Was this translation helpful? Give feedback.
-
Let me summarize the discussion:
Resources are not blocked. This is Chrome queuing the other resources due to lower prioritization, indicated by the white bar. Chrome might prioritize assets in
I could not reproduce this. But what you described is a font-display strategy. Kent used
Choose a different font display strategy.
Chromes resource prioritization and queuing? No. Showing the system font instead of the custom font until it is loaded? Possible with standard CSS. |
Beta Was this translation helpful? Give feedback.
Let me summarize the discussion:
Resources are not blocked. This is Chrome queuing the other resources due to lower prioritization, indicated by the white bar. Chrome might prioritize assets in
<head>
over the ones in<body>
which is why polyfills, fonts and CSS are loaded first. Safari and Firefox behave different because they have different opinions on the best user experience when loading websites.