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

fix: [@radix-ui/react-tooltip] tooltip performance issue #2720

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tangye1234
Copy link

Description

The main purpose of this pr is to resolve the performance issue of tooltip provider.

When there are lots of tooltips inside tooltip provider, everytime tooltip open state is changing, all of the tooltips will re-render regardless of its relation to the iteraction.

I found that provider only provides some context settings and also help to maintain some lifecycle states, while tooltip itself is enough to control its own open state. So I think it is unneccessary for the provider's states to be broadcasted to all context consumers.

@divmgl
Copy link

divmgl commented Sep 16, 2024

Can we get this in? @benoitgrelard @andy-hook

@tangye1234 is there a way I can prevent this from happening at the caller? Seems to be internal inaccessible state, but figured I'd ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High High priority issue Resolution: Needs Investigation This issue needs more investigation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants