This is a migrated thread and some comments may be shown as answers.

Optimization Help - Unresponsive script issues

3 Answers 69 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 Aug 2012, 08:35 PM
We have users, particularly IE 8 users, having issues where they get the error :
Stop Running this script?
A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer might become unresponsive.

I have been trying to optimize where we clear and add nodes to the tree and wanted some advice if possible. We have an older version of Telerik so we don't have the new bulk load option where I could pass in an array.

Currently to clear nodes I am doing :
               
                var nodes = tree.get_allNodes();
                for (var i=0; i < nodes.length; i++) {  
                    if (nodes[i].get_nodes() != null) {  
                        nodes[i].get_nodes().clear()
                    }  
                }

For adding nodes I am using
var tree = $find("<%= control.ClientID %>");
                var Node = tree.findNodeByText('NodeText');
                    var newNode = new Telerik.Web.UI.RadTreeNode();
                    newNode.set_text('');
                    newNode.set_value('');
                    newNode.check();
                    Node .get_nodes().add(newNode);

Once we get start adding close to a hundred nodes per each parent node we get this error. Any help / advice is greatly appreciated. IE9 users do not see this issue.

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 29 Aug 2012, 03:12 PM
Hello David,

I believe, that this KB will fit your needs. It is a performing solution for creating and moving an existing nodes on the client-side.

I hope that information was helpful.

Regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
David
Top achievements
Rank 1
answered on 29 Aug 2012, 05:39 PM
Thanks for the suggestion but this was the example I was saying our version doesn't support. We are using version 2008.3.1314.0 of the Telerik Web dll. I wish an upgrade was an option, but at the moment I don't think it is.

Any other suggestions?
0
Boyan Dimitrov
Telerik team
answered on 03 Sep 2012, 03:29 PM
Hello David,

There are not many options to choose from because this behavior is caused by the IE8 itself and the fact that its performance engine is not able to deal with a larger amount of HTML and javascript. Here you may find a help article, that is explaining the issue and is providing some modifications in the web.config file that may help as well.
 
I hope that this information will be helpful.

Regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
David
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
David
Top achievements
Rank 1
Share this question
or