Hi All,
I have a WebDataTree that displays Active and Inactive company names with contact details as child nodes. There are three levels as below:
Active
Company Name
Contact One
Contact Two
Company name and contact details are manually added to the tree in code behind using:
//Add company name to the tree
webDataTree.Nodes(EntityStatus.Active).Nodes.Add(item.CompanyName, item.CompanyId)
// Add contact details to the company node
webDataTree.Nodes(status).Nodes.FindNodeByKey(currentCompanyId).Nodes.Add(contactNode)
This was working fine until recently when we came across a company with more than 3000 contacts. Now, the method that loads the tree runs fine, but the tree still takes a long time to load. When selecting any contact node from the tree to display details of the contact, it brings up an IE error that the script is taking too long to run.
The Infragistics version number is 10.1.20101.1011.
I would appreciate your assistance with this query.
Thanks.
I found out finally how to solve it
in your config file add the following entry
<
appSettings>
<add key="aspnet:MaxJsonDeserializerMembers" value="5000" />
</appSettings>
ofcourse you can increase the value according to your object size
Hi Sameh,
Were you able to get this working by disabling viewstate? Do you have any sample code to do this? I am encountering a couple of issues as listed in my reply above.
Appreciate your help.
Hi Sameh and Tsvetelina,
Setting the aspnet:MaxJsonDeserializerMembers value had no effect in Infragistics 10.1. However, after upgrading to Infragistics 11.1 and setting aspnet:MaxJsonDeserializerMembers as Sameh suggested, I do not get any run-time errors. Thanks!
Manual load on demand of 3000 child nodes is still slow. How many child nodes are you loading on demand under one node?
Also, once 3000 child nodes have been loaded on demand in the NodePopulate(), selection of other nodes to view their details becomes slow.
Any tips to improving manual load on demand performance?
Thank you so much!
Hello csggroup ,
I am glad tha you have resolved your original issue.
I wasn't able to encounter performance issue when loading 3000 items from hard coded list.
I didn't reproduce the slow selection neither.
Have you checked which method/function takes most of the time?
Hope hearing from you.
Hi Tsvetelina,
The code in NodePopulate and SelectionChanged run almost instantly. The time taken when the code runs without debugging is:
Expanding a node with 3000 child nodes - 6 - 7 seconds
Selecting a node to view details - 18 seconds
The time taken when the code runs with debugging is:
Expanding a node with 3000 child nodes - 40 seconds
Selecting a node to view details - 22 seconds
Running the profiler gives the following results:
I have posted a new question to http://community.infragistics.com/forums/t/66484.aspx.
Is the webdatatree placed in an updatepanel in the test project that you mentioned which does not take long? Any sample code?
I would appreciate any assistance with regards to this.
Hi
Have you give it a try to use a xml data source instead, also get rid of lazy loading. the xml datasource is cahched over the IIS server and i didnt suffer any performance delays using it but again my nodes were around 1500
Give a try and let's see
Your response has pointed me in the right direction (I think!). I have replaced the manual load on demand with a hierarchical data source and this seems to speed up the loading of the tree.
The XML data source will not work for our purpose.
Thank you!