I'm looking for hints on how to render faster large trees with Dynatree
I just gave a try to the Dynatree jquery plugin.
I try to render a pretty large tree : Root has exactly 7592 child nodes, something like 10 levels deep from root
On my PC with Firefox browser, Firebug tells me that I get :
- page content loaded after 2.68s (this depends on network speed, 356 KB to be loaded)
- DOMcontentloaded at 3s
- then 'load' arrives at 9s
So it takes about 6s to render the tree.
Code to build the tree is made of HTML, with ul, li and "a href" tags The whole tree is created on request at server side, it doesnt take more than 500ms with classic ASP and SQL server to generate HTML for the page
is there a way to improve speed ? using JSON ? using lasy mode ? how can i set this mode on non-ajax trees ?
preguntado el 12 de junio de 12 a las 17:06
That sounds slower than I would expect.
I would recommend to build the data on the server and send as JSON. If that is still too slow, only send the first or first and second levels and mark them 'lazy', so they will be loaded on demand. You'll find a sample here: http://wwwendt.de/tech/dynatree/doc/sample-lazy.html
There is also a benchmark page, that you may use as a reference: http://wwwendt.de/tech/dynatree/doc/test-bench.html