Skip to content

fix: performance issue caused by excessive use of clearTimeout/Interval #720

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

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

astei
Copy link
Contributor

@astei astei commented Sep 21, 2021

When a large number of tooltips are mounted, there is an excessive amount of unnecessary clearTimeout() and clearInterval() calls being made, which cause very slow re-renders. In our case, this PR alone shaved off much the re-render time of one particularly expensive re-render (850ms to 472ms).

@aronhelser
Copy link
Collaborator

Looks good, thanks!

@aronhelser aronhelser merged commit 518745b into ReactTooltip:master Mar 10, 2022
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.

2 participants