-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 slow rerendering of large tables (reopened) #6422
base: master
Are you sure you want to change the base?
Conversation
…afe-context and useStyles.
# Conflicts: # packages/@mantine/core/src/core/styles-api/use-styles/use-styles.ts # packages/@mantine/core/src/core/utils/create-safe-context/create-safe-context.tsx
…nsformed-styles. Fixed useStyles after merge.
@2jordan3 sorry, I closed #5684 by accident.
I think value of name couldn't be putting directly in the dependency array, because this array can have different size in renders. How about use |
packages/@mantine/core/src/core/styles-api/use-styles/use-styles.ts
Outdated
Show resolved
Hide resolved
I see, that method seems better! |
Fixed |
Hi! I have lags with rerendering of large tables with memoized rows:
Eventloop lags for 200ms when I click on the button in this simple example. But all rows are memoized.
I noticed then
TableContext
have a new value every render. It leads to rerender ofTable.Tr
andTable.Td
:Memoizing of the context and
useStyle
can improve performance:I can suggest my decision of this problem in the pull request. Maybe you have another ideas.