Skip to content
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

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

@oliviertassinari oliviertassinari marked this pull request as ready for review September 28, 2024 10:13
@mui-bot
Copy link

mui-bot commented Sep 28, 2024

Netlify deploy preview

https://deploy-preview-43911--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 6d92073

Copy link
Member

@Janpot Janpot left a 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.

@oliviertassinari
Copy link
Member Author

My guess was that 2,000 function calls (onClick handler creation + random) is cheaper than downloading and parsing HTML

@oliviertassinari
Copy link
Member Author

I have measured the overhead to be around 0.1ms. Moving forward with this, it looks simpler.

@oliviertassinari oliviertassinari merged commit 955f109 into mui:master Sep 30, 2024
24 checks passed
@oliviertassinari oliviertassinari deleted the material-icons-size branch September 30, 2024 18:05
@Janpot
Copy link
Member

Janpot commented Oct 1, 2024

👍 The price per extra kB on my network is about 0.3ms. So for 10kB it's roughly an order of magnitude difference.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Oct 5, 2024
@oliviertassinari oliviertassinari changed the title [icons] Reduce Material Icon page size [icons][docs] Reduce Material Icon page size Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation package: icons Specific to @mui/icons performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants