-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[core] Simplify createPalette #44075
[core] Simplify createPalette #44075
Conversation
Netlify deploy previewhttps://deploy-preview-44075--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
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.
Great catch. Alternatively
const getDefault = { dark: getDark, light: getLight };
// ...
...getDefault[mode](),
could result in less code 🙂
Yeah ok, hoisting this could be even simpler and have better performance. Soon or later, we will need to get a lot more serious with performance monitoring. Maybe mui/mui-x#14804 (comment) is the solution. |
Arf, it doesn't work, the test break, it changes the behavior. Comparing https://tools-public.onrender.com/prod/pages/bundleSizes?circleCIBuildNumber=759455&baseRef=master&baseCommit=a25a365a4c66738f358ecd745bf3727c0ca9d5b6&prNumber=44075 and https://tools-public.onrender.com/prod/pages/bundleSizes?circleCIBuildNumber=759483&baseRef=master&baseCommit=a25a365a4c66738f358ecd745bf3727c0ca9d5b6&prNumber=44075, size seems to be the same. |
This reverts commit 7859020
Seen in #44059 (comment). The goal is to reduce the memory pressure.