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

Properly memoize menu and popover #1675

Closed
oddvernes opened this issue Nov 5, 2021 · 0 comments · Fixed by #1810
Closed

Properly memoize menu and popover #1675

oddvernes opened this issue Nov 5, 2021 · 0 comments · Fixed by #1810
Assignees
Labels
core-react eds-core-react ✨ enhancement Enhancements for our existing components

Comments

@oddvernes
Copy link
Collaborator

oddvernes commented Nov 5, 2021

Describe the bug

Menu and popover uses the popper hook which sends updated positional data every frame during scrolling, which means these components and some of their children gets rendered every frame (not painted though, just the function runs which can be a bit heavy on itself)

Steps to reproduce the bug

  1. console log the functions and children

Expected behavior

Better memoization to avoid performance impact during scroll. Also perhaps there is a way to pause popper when the popup is closed

@oddvernes oddvernes added the 🐛 bug Something isn't working label Nov 5, 2021
@mimarz mimarz added the core-react eds-core-react label Nov 9, 2021
@mimarz mimarz added ✨ enhancement Enhancements for our existing components and removed 🐛 bug Something isn't working labels Nov 24, 2021
@mimarz mimarz closed this as completed Dec 13, 2021
@mimarz mimarz reopened this Dec 13, 2021
@oddvernes oddvernes self-assigned this Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-react eds-core-react ✨ enhancement Enhancements for our existing components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants