-
Notifications
You must be signed in to change notification settings - Fork 664
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exercice 1 Final has a huge chunk #63
Comments
Keep in mind that all workshops are pretty contrived examples and are intended to demonstrate concepts. The workshop app is large and has a lot of moving pieces. I'm not concerned about the performance of the workshop itself. I'm much more concerned about you learning how to use the tools to analyze an app and identify opportunities for optimizations. That said, this does look like a regression. After investigating that chunk, it looks like the vast majority of it is SVG icons. I'm guessing those aren't getting tree-shaken like they should. Here's where they're imported |
I'm not sure when this happened, but I believe the reason it's not tree-shaking is because I'm building the |
@all-contributors please add @ValentinH for bugs |
I've put up a pull request to add @ValentinH! 馃帀 |
Yes I understand that these are pretty contrived but I was still surprised to see such a big chunk on a page that is not doing much to be fair. Thanks for the quick fix BTW 馃檪 |
Yeah, they really shouldn't. That was the original goal (and part of the reason the entry file is so complicated/vanilla): https://github.com/kentcdodds/react-workshop-app/blob/e0b6a83193b23d5b02ed06db732c231e4053fc41/src/index.js But I had a little trouble making it work at some point and gave up trying to lazy-load the There's a surprising amount of complexity involved to make sure the experience for learners is as smooth as possible 馃槄 |
I understand 馃槃 Rest assured, my experience so far is SUPER SMOOTH! 馃帀 |
Hey 馃憢
I'm following the first lesson right now about code-splitting and I noticed something odd: one of the initial chunk is huge. It's 867KB gzipped and 3.5MB once decompressed 馃槺 .
I'm using this page: https://react-performance.netlify.app/isolated/final/01.js
As this exercice is about avoiding loading unnecessary JS, this is misleading. In the end, what we save with code-splitting is quite small compared to this chunk.
In the video, I don't see it so it might be a regression.
The text was updated successfully, but these errors were encountered: