-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
trying to use lazy/Suspense results in slow dev build and random crash #5940
Comments
I clearly recall webpack being slow if you overuse code splitting. Like 8-10+ chunks made webpack really slow. |
But doesn't this effectively render useless the whole I mean every presentation of the feature made it seem like we could reuse it (at least) hundreds of times. |
@jayarjo I don't think it's worth to load each icon separately. You'll have way too many HTTP requests for that. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
I'm trying to make use of Material UI, but stumbled upon severe performance issues when trying to use it in conjunction with
lazy
andSuspense
.I've created a repo here. However it's just fresh
create-react-app
+@material-ui/core
and@material-ui/icons
.Material UI has each icon as dedicated component, so there's a logical obstacle when one wants to load an icon dynamically. I wrote this:
...and then I use this component as following:
But as soon as I do this, build time for my dev refresh increases dramatically (~30secs) and sometimes it crashes with:
If build succeeds icon is included and shown as expected.
The text was updated successfully, but these errors were encountered: