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.
Thanks Sameh. I will try this shortly.
Was there a specific reason you chose 7000 as the value? Does it correlate to the number of nodes or number of child nodes etc?
There was no specific reason for choosing 7000 it is to make sure enough that i covered all my nodes. i believe it correlates to the total number of tree nodes which are cahced at the tree view state , what the view state actually does is it serializes these objects and flushes the xml with the page html renedered in a hidden field right, so when you apply post back the server Deserializer object attempts to deserialize these objects one more time to map it to DateTreeNode objects hitting threshold constraint and firing the nasty exception
By initially disabling the view state no objects were serialized hence DataTreeNodes to serialize = 0 that explains why the exception wasn't fired when we disabled the control View State but most of the cases we need to maintain the control view state for tracking checked/unchecked nodes
Sam
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.
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!
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