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

Particles started loading very slowly recently #96

Closed
maxwowo opened this issue Mar 1, 2024 · 2 comments
Closed

Particles started loading very slowly recently #96

maxwowo opened this issue Mar 1, 2024 · 2 comments

Comments

@maxwowo
Copy link

maxwowo commented Mar 1, 2024

Hi there! Thanks for all the work you've put into this library. I've recently noticed that the particles, which would've taken no more than 500ms to load before, suddenly started taking very long to load on my website.

Screen record:

Screen.Recording.2024-03-01.at.8.47.39.pm.mov

Site: https://www.maxwowo.com/

Repo: https://github.com/maxwowo/maxwowo

File that mounts the particles: https://github.com/maxwowo/maxwowo/blob/master/src/components/particles.tsx

This is the case across Chrome, Firefox, and Safari. My site should be pretty simple in structure and I also haven't made any changes to it recently, so just wondering what might be going on

Cheers

@matteobruni
Copy link
Contributor

You need to move the initParticlesEngine in another place, that loads all the script necessary to start the animation and it could take a while since now uses dynamic imports to reduce the bundle size. You can call it in the index, or some place where you are loading other stuff as well. The readme itself uses it in the main App function.

@maxwowo
Copy link
Author

maxwowo commented Mar 1, 2024

I see, cheers for the explanation!

@maxwowo maxwowo closed this as completed Mar 1, 2024
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

2 participants