We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Treeview takes much time to load 400 nodes

I have a sérious problem with the TreeView.
I load about 400 to 500 nodes
it takes much time !

there is who can help me ?? (optimaze)
thanks !!




7 Replies

VK Vishnu Kumar Syncfusion Team January 11, 2008 01:37 PM UTC

Hi Faleh,

Thank you for posting your query to us.

Treeview takes much time to load 400 nodes

You can use load on demand TreeView to bind the large number of node in TreeView. This will bind the child nodes dynamically when the parent node expands and this will optimize the time.

Also I have created a simple sample for LoadOnDemand and it is available in the following link:


http://www.syncfusion.com/Support/user/uploads/70983_f5e61aae.zip


Please try running the above sample and let me know if this helps.

Regards,
Vishnu




FA Faleh January 11, 2008 03:39 PM UTC

the 400 nodes are on the same level

so it takes too long time even though on expand mode server side callback !!

the load on demand solution doesnt help !!



VK Vishnu Kumar Syncfusion Team January 17, 2008 11:38 AM UTC

Hi Faleh,

Thank you for your patience.
Treeview takes much time to load 400 nodes

I am afraid that I was not able to reproduce the issue. Treeview takes only 5 to 6 seconds to load all the nodes. Also I have created a simple sample to test this issue and it is available in the following link.

http://websamples.syncfusion.com/samples/Tools.Web/6.1.0.34/70983_Modified/main.htm

Please have a look at the above sample and if still it takes more time to loads, could you please try reproducing it in the above sample and send us modified sample so that we could sort out the cause of the issue and provide you a solution?

Regards,
Vishnu.




FA Faleh January 17, 2008 02:04 PM UTC

I apologize, but your sample page, take approximately 1 a minute for it to be loaded.
Maybe in localhost it takes from 5 to 6 seconds.
Is the rate of internet somewhat responsible ?



PG Pierre-Alain Galtier January 17, 2008 03:15 PM UTC

Hi Faleh,

Perhaps you souhld look at the source code of the generated html (apsx) page.

And see how many ko it takes.

I have the same problem with my treeview and dont know yet how to optimize it




PG Pierre-Alain Galtier January 17, 2008 03:31 PM UTC

What's more,

Here is an HTML output of a treeview with 2 nodes (8 KB !!!) :


onclick="_sftvLegende.OnClick(this, event)" ScrollTop="0" onkeydown="_sftvLegende.OnKeyDown(this, event)"

onscroll="_sftvLegende.OnScroll(this, event)" ScrollLeft="0" ShowLines="True"

style="border-width:0px;width:100%;display:block;overflow:auto;width:100%;visibility:hidden;">

onmouseover="_sftvLegende.OnMouseOver(this, event)" onclick="_sftvLegende.OnClick(this, event)"

oncontextmenu="_sftvLegende.OnContextMenu(this, event)" style="width:100%;" onmousemove="_sftvLegende.OnMouseMove(this, event)"

ClassExpanded="tvItemRow" onmousedown="_sftvLegende.OnMouseDown(this, event)" IsItemContainer="True">
cellspacing="0">





src="/websferis/WebResource.axd?d=gOectI3NUNTaurnLjBuWBeVpvWqQRInsluQkoN16_KngnmkQ2HwquZa9Q8FKqazJqi2c7BkVFieK6rwmdx1M15xiM2QOGXklOZZdJoW

zEkKPXLEzHtfGrtnAbv4YfFCeuG5jLx2H75nmhQXSDojawOq9va_vXQnBGYNVj0LzevAf89UuM53ygL2A6HB9mSXX0&t=633298799292031250"

onclick="_sftvLegende.OnClick(this, event)" IsExpCollImg="True" style="width:20px;height:20px;" />

ClntLevel="0" ClassDefault="tvItem" ItemIdx="2" onclick="_sftvLegende.OnClick(this, event)" onmousedown="_sftvLegende.OnMouseDown(this,

event)" IsItem="True" PostBackOnDrop="False" ClntValue="" onmouseover="_sftvLegende.OnMouseOver(this, event)" ClntText="tata"

class="tvItem" ClassHover="tvItemHover" ClassExpanded="tvItemExpanded" ExpandMode="ClientSide" ClassActive="tvItemActive"

NodeEdit="False" ClntHasSubNodes="True" PostBackOnCheckChange="False" ClntDraggingEnabled="True"

onmousemove="_sftvLegende.OnMouseMove(this, event)" ClntDroppingEnabled="True" onmouseout="_sftvLegende.OnMouseOut(this, event)"

PostBackOnSelect="False">






ClassExpanded="tvImgCell" style="display:none;">

ClassExpanded="tvImgCont">
style="visibility:hidden;display:none;" />

ClassExpanded="tvTextCell">
onclick="_sftvLegende.OnClick(this, event)" ClassDefault="tvTextCont" ClassExpanded="tvTextCont">



tata


ClassExpanded="tvArrCell">

style="visibility:hidden;display:none;" class="tvArr" ClassDefault="tvArr" ClassExpanded="tvArr" />



onfocus="_sftvLegende.OnFocus(this, event)" onblur="_sftvLegende.OnBlur(this, event)"

style="position:absolute;z-index:99;top:0px;left:0px;">

value="0,0" />
name="tvLegende_ExpandedNodes" type="hidden" id="tvLegende_ExpandedNodes" value="," />
type="hidden" id="tvLegende_MultipleSelectedNodes" />
value="" />
type="hidden" id="tvLegende_Values" value="," />
/>



I think if some clients scripts could be deleted (onclick ...) and urls of lines images could be shorter (pick them up in a directory ?) on all nodes, the size could be 2 or 3 times lighter.

But I don't know if it can be done ?

Best Regards,

SCHAEFFER Christophe




VK Vishnu Kumar Syncfusion Team January 22, 2008 12:33 PM UTC

Hi Christophe,

I regret for the delayed response.

Tree view takes much time to load 400 nodes:

I am able to see the issue of that the source code of the generated html(aspx) page is large in browser. But I regret to let you know that with our current implementation of treeview, the styles and treeview definition are sent to the browser along with other details. We have notified our development team on this regard and will get back to you once we hear back from them.

Please let me know if you have any concerns.

Regards,
Vishnu.


Loader.
Live Chat Icon For mobile
Up arrow icon