DHTMLX Docs & Samples Explorer

Distributed parsing

Distributed parsing is another way to increase performance of the tree with some levels containing more than 100-200 nodes per level was introduced. The main advantage of it lies in making the level visible and ready to use before it is completely parsed. Thus, items are loaded portion by portion with some timeouts.

Get loading status
Action with item while parsing
State of item arra_200
State of item arra_7_142
Source
 
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxtree.css">
<script  src="../../codebase/dhtmlxcommon.js"></script>
<script  src="../../codebase/dhtmlxtree.js"></script>    
<table>
    <tr>
        <td>
            <div id="treeboxbox_tree" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"/>
        </td>
        <td rowspan="2" style="padding-left:25" valign="top">
<a href="#" onClick="alert(tree.getDistributedParsingState());">
Get loading status
</a><br/>
<a href="#" onClick="tree.openItem('arra_200'); tree.openItem('arra_7_142'); ">
Action with item while parsing
</a><br/>
<a href="#" onClick="alert(tree.getItemParsingState('arra_200')); ">
State of item arra_200
</a><br/>
<a href="#" onClick="alert(tree.getItemParsingState('arra_7_142')); ">
State of item arra_7_142
</a><br/>
 
        </td>
    </tr>
    <tr>
        <td></td>
    </tr>
</table>
 
<script>
var tree = new dhtmlXTreeObject('treeboxbox_tree', '100%', '100%', 0);
tree.setSkin('dhx_skyblue');
tree.setImagePath("../../codebase/imgs/");
tree.enableDragAndDrop(true);
tree.enableThreeStateCheckboxes(true);
tree.enableSmartXMLParsing(true);
tree.enableDistributedParsing(true, 10, 250);
tree.loadXML('php/tree_perf_xml.php');
</script>