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

Avoid redundant dimension calculations after a DOM mutation #620

Merged
merged 1 commit into from Dec 2, 2019

Conversation

Sidnioulz
Copy link
Contributor

Description

Changed the callback logic of a MutationObserver to avoid repeatedly calling a function that needs to be called once. Helps a lot with performance issues reported in #617.

Fixes #617

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I stress tested this change in a proprietary codebase where I use nuka-carousel. I am not able to share that code at the moment. To test the change, one should fill a carousel with complex object architectures where re-renders and image loads are likely to occur.

Checklist: (Feel free to delete this section upon completion)

  • I have added tests that prove my fix is effective or that my feature works

@sarmeyer sarmeyer merged commit 80261ad into FormidableLabs:master Dec 2, 2019
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

Successfully merging this pull request may close these issues.

Performance collapse when rendering complex children due to setSlideHeightAndWidth
2 participants