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

_serializeWithBuilder eats 95% of time in node.set_checked() API

0 Answers 24 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Gani
Top achievements
Rank 1
Gani asked on 13 Apr 2010, 02:58 AM

Hi

Question about JsonSerialization.
I saw that for the RadTreeVieNode API: node.set_checked(...); the code is:

set_checked:function(_b4,e){
 
this._check(_b4,e);
if(this.get_treeView()){
this.get_treeView()._updateCheckedState();
}
}

 
_updateCheckedState:function(){
this._checkedNodesJson=Sys.Serialization.JavaScriptSerializer.serialize(this._clientState.checkedNodes); // line XXX
this.updateClientState();
}

Now profiling the loop

var cnt = treeNodes.get_count();
for(var i = 0; i < cnt; i++) {
var node = treeNodes.getNode(i);
if (node.get_checked() != checkOrUncheck) {
node.set_checked(checkOrUncheck);
}

I see that > 95% of time we sit in _serializeWithBuilder(...) function. It's called from the line XXX.
Now, I do not need to have this. Since all the operations with RadTreeView i do on client side using client API.
There should be a possibility to disable Jsonization of nodes in the RadTree so I ll get much more performant API.

Pls assist.

Thx
Gani

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Gani
Top achievements
Rank 1
Share this question
or