-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Tooltip performances makes them unusable on large scales since v1.0.0-beta.40 #11431
Comments
@Tuaniwan The Tooltip needs some serious refinement. I will look into that post v1. Thanks for the report. |
So the regression is coming from #10843. We can greatly improve the performance by only mounting the Tooltips we need. |
Seeing this on beta 38 and 47 (before and after the portaling) so I am not sure that is the only culprit. If you use a large number of tooltips (like in a table with a hundred rows) the performance is absolutely dreadful. We've had to temporarily disable all tooltips across our app. If there is anything that I can do to help, please let me know. |
I've experienced big perf cut when there are more than 20 tooltips. In my case, I have a table with 20 rows of data per page. Each row has a tooltip. When I change pages, the whole app will be stuck for ~600ms, which is unacceptable. |
@franklixuefei It's a 1.2.2 regression. It's fixed in HEAD. |
I Dont know if this ok to raise this dead issue, but after implementing a ticket that said :"provide tooltips to xy" and there are plenty xa in my project, it drastically slowed down. |
@janpauldahlke I don't follow. What's the issue? |
For a project we are building, we are using material-ui, and up until v1.0.0-beta.39, our application's performances were always the same, but when we updated to beta.40, it became much, much slower, since we are using a large amount of tooltips.
Expected Behaviour
The performances should be similar to what they were, or similar to the react-tooltip library.
Current Behavior
Just to render a component that uses tooltips in a large scale (Around 1000), it takes 10 times the amount of time that it used to, to render. So it went from taking 600ms to load to 6.5 seconds. Although I am unable to show you the exact code that we have, I made a few codeSandboxes that show the performances of the different use cases.
Steps to Reproduce (for bugs)
Just click the button in the following 3 examples:
Example using Material-ui v1.0.0-beta.39
Example using Material-ui v1.0.0-rc.1
Example using Material-ui v1.0.0-rc.1 but with react-tooltip instead
Context
Maybe the problem is that Material-UI uses individual tooltips, and it seems like react-tooltip uses a single one, but changes it's position, not exactly sure how, but it makes a huge difference for the performances, as the 3 above examples will show.
Your Environment
The text was updated successfully, but these errors were encountered: