-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Provide a general summary of the issue here
Current project we need to have 70K items in a Tree and we can't use async load.
Tree takes a bit to load which is ok but handling the click event takes 549.23 ms
When I check the performance in chrome tools this events cause rerenders:
- focus: focus seems to trigger the entire state to change and is slow
- click: 479ms, TreeInner seems to be rerendering several times because of useDragAndDrop
Curent Tree has no drag and drop props. Would be great if we could avoid that extra process that makes it slow
🤔 Expected Behavior?
Fast onClick update
😯 Current Behavior
Slow update
💁 Possible Solution
onFocus: avoid rerender entire state
onClick: avoid extra process caused by useDragAndDrop hook
🔦 Context
Currently using react-components Tree
React 16
🖥️ Steps to Reproduce
https://codesandbox.io/p/sandbox/6rphml
Version
1.14.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Sonoma 14.6.1
🧢 Your Company/Team
Ubiquiti
🕷 Tracking Issue
No response
Reactions are currently unavailable