-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce code splitting and lazy load components to reduce bundle sizes #7257
Comments
Oof. 3.13 MB for the Settings page? That's big. Why are some of the module rows blank? I'm hesitant to spend a significant amount of time on the code splitting since performance of the pages hasn't been a user complaint so far. Nevertheless, if it is a quick win then I don't see why we shouldn't do it. |
Ahh. Sorry, I forgot to mention. While analyzing modules, no analyzing stats were there for empty blank ones. I think it's due to their fewer bundle chunks(and less in size) or there is just a plain css/js file that does not contain any other dependency in it.
I think it's because it loads on the admin side and performance doesn't matter much(I mean PX). After the first-time load, static assets got cached on the browser as well so it's not something the user will face every time. But we can keep it a low priority and analyze the field of improvement. Instead of doing heavy benchmarking, we can find out simple cases where it can be done easily. |
Currently, AMP plugin JS assets constitute various modules which are as follows with their bundle size:
Source: Webpack Bundle Analyzer
Upon bundling these assets Webpack warns of a bundle limit exceeding
244 kb
size that is not optimal for web performance. Even though these things will not affect an end user but can affect the admin side.To overcome these bundle-heavy situations we can implement react lazy loading and code splitting for such components/modules which are not needed at the time of first loading impression.
More refs on lazy loading and code splitting:
The text was updated successfully, but these errors were encountered: