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

Is it possible to reduce styles recalculation time? #2320

Closed
awfulminded opened this issue Aug 3, 2023 · 3 comments
Closed

Is it possible to reduce styles recalculation time? #2320

awfulminded opened this issue Aug 3, 2023 · 3 comments

Comments

@awfulminded
Copy link

I have noticed a performance concern regarding the styles recalculation time in Radix-UI Dialog. While experimenting with cloning nodes from the official documentation page, I observed that the interaction time increased significantly from 50ms to 200ms. Though I understand that having 10k nodes is quite excessive, it is not uncommon to find websites with similar quantities of elements performing adequately.

My intention is not to report a bug but rather to inquire if there is any feasible approach to reduce the styles recalculation time. I have raised a similar issue on the Chakra-UI library (chakra-ui/chakra-ui#7909), but the behavior appears slightly different in that context.

Any assistance or insights on this matter would be greatly appreciated. Thank you!

Untitled.1.mp4
@SaveliiLukash
Copy link

Wow, just faced this today and here is a fresh open issue.

While "Recalculate styles" is bearable in Firefox and Chrome (40.14 ms), in my case it appears to be an issue in Safari (336.7 ms), both MacOS and iOS. A noticeable delay when opening the menu

CleanShot.2023-08-04.at.20.11.50.mp4

First project using radix-ui, was using react-bootstrap for a long time before and had never faced such an issue. Would appreciate any insights and advice.

@awfulminded
Copy link
Author

Wow, just faced this today and here is a fresh open issue.

While "Recalculate styles" is bearable in Firefox and Chrome (40.14 ms), in my case it appears to be an issue in Safari (336.7 ms), both MacOS and iOS. A noticeable delay when opening the menu

CleanShot.2023-08-04.at.20.11.50.mp4
First project using radix-ui, was using react-bootstrap for a long time before and had never faced such an issue. Would appreciate any insights and advice.

Hey!

if you still have this issue with radix, you should check mu chakra-ui issues with pretty much simillar problem, there is potential solution for this chakra-ui/chakra-ui#7909

@benoitgrelard
Copy link
Contributor

benoitgrelard commented Feb 27, 2024

Let's concentrate on a single issue rather than have lots of duplicates for the same thing: #1634

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

No branches or pull requests

3 participants