jupyter-widgets-contrib / ipytree

A Tree Widget using Jupyter-widgets protocol and jsTree
MIT License
130 stars 27 forks source link

deselect_all only selected_nodes of tree #72

Closed deco-dev closed 1 year ago

deco-dev commented 2 years ago

If we select another node in existing selected node, the tree is happened deselect_all event. Then it iterates all nodesRegistry. It is big overhead. Because it also iterates other tree nodes. So I fixed it. If deselect_all event happend, it only iterates selected nodes.

martinRenou commented 2 years ago

Thanks! Could you confirm that the performance is better with ~1000 nodes?

deco-dev commented 1 year ago

Yes, In my PC, It is not slow with 10,000nodes.

martinRenou commented 1 year ago

Nice! The code looks good to me, I will give it a shot and merge

martinRenou commented 1 year ago

Should fix https://github.com/QuantStack/ipytree/issues/25

rknegjens commented 1 year ago

Could this PR (as well as #80) be released as patch or minor?