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

Using <Background /> tanks my CPU #387

Closed
drydenwilliams opened this issue Jun 14, 2019 · 2 comments · Fixed by #782
Closed

Using <Background /> tanks my CPU #387

drydenwilliams opened this issue Jun 14, 2019 · 2 comments · Fixed by #782

Comments

@drydenwilliams
Copy link

drydenwilliams commented Jun 14, 2019

Describe the bug
I have a media gallery which loads set background images using the <Background /> component and as soon as I started using it, my CPU load spike massively.

Screenshot 2019-06-14 at 13 05 53

Different between not using the <Background /> component in the first half of the graph. And using it in the second half.

Screenshot 2019-06-14 at 13 11 03

To Reproduce
Add a list of images using the <Background /> component and see the spike in CPU.

<Background
  src={imageSrc}
  imgixParams={{
    crop: 'entropy',
    h: 200,
    w: 200
  }}
  className="blog-title"
>
 Title
</Background>

Information:

@ericdeansanchez
Copy link
Contributor

Hey @drydenwilliams, I'm currently working on solving this issue. The <Background/> component is constantly re-rendering. The fix I'm working on aims to ensure minimal re-renders.

@imgix-git-robot
Copy link

🎉 This issue has been resolved in version 9.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants