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

[docs] Clarify difference in startup times between named and default imports in minimizing-bundle-size.md #33109

Merged
merged 8 commits into from Aug 10, 2022
Expand Up @@ -25,8 +25,16 @@ that doesn't support tree-shaking.
## Development environment

Development bundles can contain the full library which can lead to **slower startup times**.
This is especially noticeable if you import from `@mui/icons-material`.
Startup times can be approximately 6x slower than without named imports from the top-level API.
This is especially noticeable if you import using named imports from `@mui/icons-material`.
Startup times can be approximately 6x slower with named imports than without e.g.

In some cases
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the "in some cases". We already say that they can be slower.

Suggested change
Startup times can be approximately 6x slower with named imports than without e.g.
In some cases
Startup times can be approximately 6x slower with named imports than without e.g.:


`import { Delete } from '@mui/icons-material'`

can be slower than

`import Delete from '@mui/icons-material/Delete'`
cmdcolin marked this conversation as resolved.
Show resolved Hide resolved

If this is an issue for you, you have various options:

Expand Down