perf(qwikloader): put qwikloader in a separate bundle #7613
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.
We were embedding the qwikloader, which is faster for initial load, but recent experiments with modulepreload show that this isn't necessary.
By putting the qwikloader in its own bundle and using modulepreload + async module script:
This doesn't seem to impact LCP at all.
In the pathological 3G simulation with the fixed 2s lag, the chunk is fetched first, while the html is still downloading, and finishes pretty soon after html finished downloading and while the other resources are also downloading, so the user doesn't really notice anything.
compared to before:

(the other two yellow preloads you see are the preloader bundle and the qwik core bundle)
PS it would be really cute to find a string to embed in the preloader that would make the current
uD3ipkCl
hash start withql_
. Anybody with a lot of compute time to burn? :)