- Code splitting can be beneficial.
- Magnifying the code is a nice choice.
- Compress your code using the Brotli outperforms gzip on compression ratio.
- Remove unused codes using different tools like DevTools code coverage, tree-shaking, Closure Compiler’s advanced optimization etc.
- Use Service Network caching to minimize network trips.
For example, if you try to open regular CNN website on high-end iPhone 8, then the parse/compile time is recorded 4s. But, if the same website is opened on the regular phone, then parse/compile time will be 13s. So, now you see the impact of parse/compile cost on your lives, people.
When you are trying to slow the network and parse/compile costs for your website, then numerous route based chunks can help you in achieving this goal. PRPL is a pattern that helps you in signifying the interaction rate through code splitting and caching.
- Memory. The webpage can jam or pause frequently due to the Garage Collection. When a browser reclaims memory, JS execution is paused so a browser frequently collecting garbage can pause execution more frequently than we may like. To avoid this problem, regularly keep eye on the memory leaks and garbage collections.