Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Performance of WebTree CSOM
posted

I'm trying to populate a web tree with data from an XML String in an XMLHttpRequest handler.  There are over 1000 nodes, and it takes so long IE asks me if I want to terminate the string.  I've listed the java script below if anyone has any hints on how to speed it up.

tva.prototype.receiveTree = function(req){

 

var req = this.currentRequest();

if (req.readyState == 4) {

 

var xmldom = req.responseXML;

var products = xmldom.documentElement.getElementsByTagName("product");

 

var newnode;

var atts;

var i;for (i=0;i<products.length;i++)

{

atts = products[i].attributes;

newnode = this.node.addChild(atts.getNamedItem("Name").nodeValue);

newnode.setTag(atts.getNamedItem("ProductId").nodeValue);

}

}

}

  • 28464
    posted

    Hello,

    While this is certainly a possible approach, I am wondering why are you manually doing this - because the treeview has a mode (LoadOnDemand) that does this automatically for you - all this processing of nodes on the client and fetching the XML string from server is built-in.

    I can suggest taking a look at these examples (AJAX -> UltraWebTree) in the samples framework:

    http://forums.infragistics.com/forums/t/11424.aspx

    Even in this case, I am not sure if 1,000 nodes can be easily fetched at once. Maybe, you can split them in batches using your approach and notify the customers that several subsequent requests need to take place?