Open aligent-lturner opened 5 years ago
Thanks for getting the discussion started @aligent-lturner! Going to drop in some comments from @Januszpl as well:
I'm a bit unsure of what the efficacy of something like this would be. In some situations, if done wrong, this could make things a bit worse. My guess is that it would be a benefit in the scenario that those "2-page modules" are on the larger side, but chunking off few kilobyte bundles for those "2-page modules" would likely have similar or slightly worse performance (due to extra round trip + weaker gzip compression).
Having said all that, it's impossible to know without trying it out and running some traces with some real stores.
Would someone be interested in manually-tweaking a config file and doing some profiling?
This issue is a:
Environment
Description
Let me preface this by saying I'm not 100% sure on this, but this is my understanding of the situation:
Currently, any module used in more than one page gets added to the single "shared" bundle. However, this might end up with modules used only on the PDP and PLP (for example) being loaded on every page. I'm sure it wouldn't be simple to implement, but it would be useful to be able to produce additional bundles, such as a "catalog" bundle for modules common to PDP and PLP, a "shipping" bundle for modules common to cart and checkout, etc.
Expected result:
"shared" bundle reduced in size, with additional bundles for common functionally. In theory, this would provide a more optimal set of modules for each page.
Possible solutions:
Either allow the user to link pages, or work from a pre-defined set of linked pages.