fix(gatsby): add app-data to preload list #21537
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adding app-data to the
<link preload
list so we make sure to start our js execution as fast as we can.This fixes a regression introduced by #16686
Doing this fix introduces us to the next problem: network congestion and bundle bloat. It's hard to explain on these graphs what to see but you should see images coming in faster and execution of js being done faster because app-data is instantly loaded. I also added video's so it makes it more visible what difference it makes
Gatsby before and after, not much difference but the graph shifts a little.
webpagetest comparison
video
Third and grove is a bitter better too
webpagetest comparison
video
When there is no network congestion we can see that we're actually faster
webpagetest comparison
video
What's next?
Update netlify plugin to have http preload for page-data & app-data, it should make that a few 100ms faster and looks at our bundle sizes.
Related Issues
Fixes #21176