TreeView optimization

I’m dealing with treeView / treeViewItem and i noticed that with huge number of customComponent , adding and removing some of them took a very long time.
Following the structure offered by the JUCE demo ( ValueTreesDemo.h ) in the DemoRunner, when some changes on the value tree happen it make a rebuild of the items…
This have an O(N) complexity and i wonder if someone has some hints to deal with it, maybe store a map of the current items and take them from it ( if exist ) instead of creating them ?