[PR #4176] dbeaver/pro#8355 throttle hover and menu showing #4746

Open
opened 2026-03-07 21:19:41 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/dbeaver/cloudbeaver/pull/4176

State: open
Merged: No


closes 8355

We ve removed the hover state and menu from each node and moved them to the Tree component so performance will be much better in the new Tree.

For now, in old tree, what works best is startTransition, as it makes hover updates non-blocking and does not cause regressions in production on capable devices, since it does not delay state updates with a specific hardcoded timeout

in general, the performance issue is that the hover state changes too quickly, causing the menu to mount and unmount repeatedly, which triggers very heavy calculations. The issue is still reproducible even without the menu, just changing the hover state itself causes the component to re-render a lot. New Tree will not have such problems, we are controlling hover there via css as menu trigger there is not actual menu, but just a button so we can hide it with just css.

before:

https://github.com/user-attachments/assets/c209d572-5801-4f92-9d17-942f6163b52d

after:

https://github.com/user-attachments/assets/83327d1b-515b-498d-915f-f2c2cee445c4

**Original Pull Request:** https://github.com/dbeaver/cloudbeaver/pull/4176 **State:** open **Merged:** No --- closes [8355](https://github.com/dbeaver/pro/issues/8355) We ve removed the hover state and menu from each node and moved them to the Tree component so performance will be much better in the new Tree. For now, in old tree, what works best is startTransition, as it makes hover updates non-blocking and does not cause regressions in production on capable devices, since it does not delay state updates with a specific hardcoded timeout in general, the performance issue is that the hover state changes too quickly, causing the menu to mount and unmount repeatedly, which triggers very heavy calculations. The issue is still reproducible even without the menu, just changing the hover state itself causes the component to re-render a lot. New Tree will not have such problems, we are controlling hover there via css as menu trigger there is not actual menu, but just a button so we can hide it with just css. before: https://github.com/user-attachments/assets/c209d572-5801-4f92-9d17-942f6163b52d after: https://github.com/user-attachments/assets/83327d1b-515b-498d-915f-f2c2cee445c4
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#4746
No description provided.