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

Performance issue - Loading all icons in advance. #83

Open
iyunusov opened this issue Dec 2, 2023 · 0 comments
Open

Performance issue - Loading all icons in advance. #83

iyunusov opened this issue Dec 2, 2023 · 0 comments

Comments

@iyunusov
Copy link

iyunusov commented Dec 2, 2023

I tried using this lib in a React + Next app. So added
import 'react-material-symbols/rounded'; to a child component of my Root Layout. and then did import { MaterialSymbol } from 'react-material-symbols'; in a leaf component like given in the Readme.md file.

I only want to use a couple of icons from this lib, but seems it's loading all of the them at once, 3.9 MB in size, which is a real performance issue.

Screenshot 2023-12-02 at 17 16 20

I thought it would do the @mui/icons-material way, pushing icons in SVG (exclusively the invoked ones).

Is this the way it works, or is there a way to reduce that load ?

@iyunusov iyunusov changed the title Performance issue - Loading all icons at once Performance issue - Loading all icons in advance. Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant