palantir/blueprint

Expanding a tree with many child nodes that have ContextMenu is very slow

Open

#6.204 geöffnet am 6. Juni 2023

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (2.167 Forks)batch import
Domain: performanceP2Package: coreType: bughelp wanted

Repository-Metriken

Stars
 (20.263 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 43T 10h) (27 gemergte PRs in 30 T)

Beschreibung

Environment

  • Package version(s): The latest @blueprintjs/core@4.20.1, @blueprintjs/popover2@1.14.9
  • Operating System: macOS
  • Browser name and version: Edge/Chrome

Code Sandbox

https://codesandbox.io/p/sandbox/festive-rgb-j35zpp

Actual behavior

If the tree node has many children nodes, and these children nodes are wrapped with ContextMenu2, when expanding the tree node, it's stuck for seconds to expand its children. If the ContextMenu2 is removed, the expanding is very smooth.

The sandbox uses the treeExample from the blueprint itself and makes a little change to demonstrate this problem.

Contributor Guide