Fix slow rerendering of large tables (reopened)#6422
Fix slow rerendering of large tables (reopened)#6422Smert wants to merge 5 commits intomantinedev:masterfrom
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 |
|
Wow, that is actually a significant performance improvement. Maybe this can get merged someday? Would help a table heavy app I have a lot. |
|
Is there anything preventing this from being added to the codebase? |
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
TableContexthave a new value every render. It leads to rerender ofTable.TrandTable.Td:Memoizing of the context and

useStylecan improve performance:I can suggest my decision of this problem in the pull request. Maybe you have another ideas.