dhtmlXTree performance

Hello!



I am using the dhtmlxtree component in my application and I have encountered the following problem:



I am loading the tree from an xml file.

My tree is relatively small (2000 - 3000 nodes maximum) and well formed (no branch has too many children, 20 children per branch maximum).

While in FF3 and Safari my application performs fine, in IE7 it is very slow.



I have noticed using the YSlow plugin that the dhtmlxtree adds too many DOM elements, causing IE7 to be slow.

To give you an idea, upon loading the tree approximately 8000 DOM elements are added to the DOM tree.



I use the smartXMLParsing and smartRendering functions which have improved performance greatly.



The problem is that the more nodes the user expands the more DOM elements are added to the DOM tree.

Is there a way, to remove DOM elements for the nodes of the tree that are not displayed?



I hope I have made myself clear.

Thank you in advance!



Kostas Tilelis

Is there a way, to remove DOM elements for the nodes of the tree that are not displayed?
Unfortunately there is no built-in method which will allow to remove closed|invisible DOM elements.
Technically it possible to remove related branches on closing , and re-parsing them on xml on next expanding, but item will lost all properties defined after parsing from XML ( changes in text, styles, selection etc. )
Please inform if you need a sample of such customization.

Thank you for your prompt reply!
Unfortunately I suspected that changing the DOM tree would not be easy. (It would be a great update for your component though, as it would greatly improve performance in IE7 which is still widely used.)

Could you please provide me with examples for achieving the customisation you mentioned?

Sample of possible customization sent by email.