-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[icons][docs] Reduce Material Icon page size #43911
[icons][docs] Reduce Material Icon page size #43911
Conversation
Netlify deploy previewhttps://deploy-preview-43911--material-ui.netlify.app/ Bundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what the impact on React rendering time is. iirc that was the original goal of the change
Edit: realized I still had this experiment on a local branch, it looks like it could drastically reduce page size. Will need to clean it up a bit first though.
My guess was that 2,000 function calls (onClick handler creation + random) is cheaper than downloading and parsing HTML |
I have measured the overhead to be around 0.1ms. Moving forward with this, it looks simpler. |
👍 The price per extra kB on my network is about 0.3ms. So for 10kB it's roughly an order of magnitude difference. |
Before
After
Not a big difference ~7% saving, but it helps, the page is big. This is flagged in https://app.ahrefs.com/site-audit/3992793/data-explorer?columns=pageRating%2Curl%2Ctraffic%2ChttpCode%2Csize%2CtimeToFirstByte%2CloadingTime%2Cdepth%2Ccompliant%2CincomingAllLinks%2Corigin¤t=27-09-2024T024913&filterId=709f929d4b01712e0ab256af7bad8fea&issueId=c64da874-d0f4-11e7-8ed1-001e67ed4656&sorting=-pageRating. Since we compet for SEO for this page, it makes sense to me, it's a quick-win.
Preview https://deploy-preview-43911--material-ui.netlify.app/material-ui/material-icons/
Help with #41126