-
Notifications
You must be signed in to change notification settings - Fork 144
Could hurt performance #11
Comments
@igrigorik what are your thoughts on this? |
I don't think I have enough context here to make an informed comment.. what is the plugin preloading? Note the preload requires |
I don't feel I'm following. The default setup here is structured around a developer preloading scripts they know are going to be used for the current session or closely thereafter - this isn't different to how one would manually go about tackling the problem. We don't encourage preloading all resources to avoid excessive network congestion etc. Perhaps you could share a code sample of where you think the defaults might steer folks astray? Right now, it's been doing what I would expect correctly in my own apps. |
+1 |
Re-reading through this thread, it sounds like this is more of a documentation issue that I need to work on. The plugin has been written with enough flexibility to:
I'll take an AI to better reflect some of the nuance here in the README. In short, folks should be sure that preloading or prefetching specific resources are going to have a measurable improvement (with or without this plugin) - the plugin is there to help you avoid wiring challenges, in particular when your chunk names might be dynamically generated/done in a non-easily deterministic way. |
My hypothesis is that default setup of this plugin could actually hurt performance. It adds the resource with the highest prio on the network queue. Delaying critical resources when bandwidth congestion occurs or the max connections have been taken. Basically takes away the benefit of lazyloading. If the hypothesis is proven, it would be better to add them as prefetch by default and optionally as preload
See: NOTE: relationship to prefetch -> https://www.w3.org/TR/preload/
The text was updated successfully, but these errors were encountered: