DEV Community

Cover image for Improve React App Performance - Intro-[ Part 1 ]
Rupesh Padhye
Rupesh Padhye

Posted on β€’ Edited on

2 1

Improve React App Performance - Intro-[ Part 1 ]

In this series of blog post, I will be sharing the experience of how we improved the frontend react single page application performance.

Transitioning to React πŸ§‘β€πŸ’»πŸ§‘β€πŸ’» πŸ§‘β€πŸ’» βš›οΈ
We were revamping our SaaS product's frontend from AngularJS to React. The focus was adding new features and delivering fast. Over time we have added 100's of new React components. State management was done using Redux + Redux Saga.

Make it Faster πŸ‡
Next goal is Web app should load fast in order to keep the user’s attention, keep them engaged and deliver a positive experience. the experience should be consistent in mobile or over slow internet.

Huge bundle size πŸ‹οΈβ€β™‚οΈ
After Looking at chrome coverage tool and GTMatrix report, we confirmed that we are serving huge JS bundle.Though it’s not being run, this JavaScript code will still be parsed and evaluated, which takes time.

  • Around 70% of code 🧳 is unused while loading the page.

  • it taking noticeable time for initial page rendering

Chrome Coverage Tool

GTMatrix Report

Fruits of Efforts
bunch of developers started working on it and we saw early bearing fruits for the efforts

After Code Splitting -GTMatrix Report

How We Solved It 🦸🦸

  • The solution for that problem is to split up the application into multiple JS chunks and load them on demand aka Code Splitting (πŸ”ͺ)
  • One can think of code splitting as incrementally downloading the app.

I will be sharing the detailed information about how we achieved it in following subsequent posts

so don't forget to follow & share in your network if you are interested in frontend optimisation.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay