3 ms·
We have not yet but it is the goal we're working towarss. Migrating our legacy Luna code to be compatible with "use strict" and not rely on implicit global vari
by pspeter3 9y ago
We have not yet but it is the goal we're working towarss. Migrating our legacy Luna code to be compatible with "use strict" and not rely on implicit global variables has been a grueling endeavor. We're actively testing a Webpack based bundle in production right now. If that works, we'll start testing both chunking and code splitting.
Do you have any data on the page load performance improvements? We would appreciate any insight.
- BIackSwan 9y agoSure. We are a B2C company. We have multiple customer flows to place orders on our website. Majority of our users use mobile phones to place orders. Thus, performance of our webapp on mobile is critical. Our users have slow 3G connections to access it. And we ran experiment to speed up one of flows to use route based chunking/code splitting. We got a 10x improvement. The uncached gzipped page load speed went from ~30s to ~3s on a 3G connection. We used chrome's throttling (both network and CPU) feature to test and build the app. We had to modify our user flow a bit to allow render the first page super fast, but it was well worth the tradeoff. The biggest reason of the speed up was just the smaller initial bundle size (the first chunk only contained react and react-dom plus the first component to render) and the fact that the render only needed that to get started with the first paint. There is still the problem that the other chunks are not loaded until the subsequent components are actually asked to be rendered - so now we are working on a way to asynchronously preload the other chunks in the background while the user is interacting with the first component, thus making the subsequent interactions super fast. Still a WIP though.
- pspeter3 9y agoSounds great and inline with our thoughts. I'd love to see a blog post with more detail when it works!