« Return to Thread: Tree "Expand All" taking too much time for a large tree
Dustin Machi-3 wrote:In general this is just never going to work well. Trees in general
are not all that great of an interface...especially in the web.
Leaving that aside though, the expand all function is always going to
be slow as it has to render a lot of complex html aside from
retrieving the data. Hundreds of nodes being added like this is
slow. Anyway, one of the points of the system is to use a dojo.data
store that can lazily load the data from the server and render what is
needed as needed. Expand all forces all that to happen at once. I
don't expect that you will find a solution that really does expand
all. In the past, I've generally expanded the top level and then
expanded below that as necessary.
Dustin
On Jan 9, 2009, at 5:53 AM, Pronab Bhattacharyya wrote:
>
> Hi All,
> I am facing a problem with dojo tree.
> The requirement is to display a dojo tree as default expanded and
> also user can click on "Expand All" which will alow the tree to
> expand.
> For both these activities I am using a java script function:
>
> function expandAllNode()
> {
> var treeObj = dijit.byId('mytree');
>
> var children = treeObj.rootNode.getChildren();
> expandChildNode(children, treeObj);
>
> }
>
> function expandChildNode(children, treeObj)
> {
> for (var i = 0; i < children.length; i++)
> {
> var node = children[i];
> if (node.isExpandable && !node.isExpanded)
> {
> treeObj._expandNode(node);
> }
>
> var childNodes = node.getChildren();
> if (childNodes.length > 0)
> {
> expandChildNode(childNodes, treeObj);
> }
> }
> }
> Now for auto expand I am calling it by
> dojo.addOnLoad(function(){
>
> timer = setTimeout("expandAllNode()",1000);
> highlightNode();
>
> });
>
> Problem: The problem is If the tree is too large it will not being
> expanded by default within 1000 millisecond.
> Also if the tree is too small first it showing in collapse mode the
> its expanding after a bit of second.
> Also for a big tree Expand All is taking too much time (some times
> may be more 1 min have to wait for Expand All)
>
> Can you please help me by providing a robus sollution which will
> allow me to auto expand as well as Expand All.
>
> regards
> Pronab
>
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest@dojotoolkit.org
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest@dojotoolkit.org
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
« Return to Thread: Tree "Expand All" taking too much time for a large tree
| Free embeddable forum powered by Nabble | Forum Help |