DHTMLX Docs & Samples Explorer

Distributed parsing

To decrease time before grid appears on page you can enable Distributed Parsing.
In this case grid will be shown right after the first portion of data parsed although it continues parsing other portions in async mode. Changing number of records per portion and delay (in milliseconds) you can change the loading speed.

Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title>Distributed parsing</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myGrid;
		function doOnLoad(){
			myGrid = new dhtmlXGridObject('gridbox');
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
			myGrid.setInitWidths("50,150,120,80,80,80,80,200");
			myGrid.setColAlign("right,left,left,right,center,left,center,center");
			myGrid.setColTypes("dyn,ed,ed,price,ch,co,ra,ro");
			myGrid.getCombo(5).put(2,2);
			myGrid.setColSorting("int,str,str,int,str,str,str,date");
			myGrid.init();
			//enabling distributed parsing
			myGrid.enableDistributedParsing(true,10,300);
			myGrid.loadXML("../common/500_14_loading_big_datasets.xml");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Distributed parsing</h1>
	<p> To decrease time before grid appears on page you can enable Distributed Parsing. <br>
		In this case grid will be shown right after the first portion of data parsed although it continues parsing other portions in async mode. Changing number of records per portion and delay (in milliseconds) you can change the loading speed. </p>
	<div id="gridbox" style="width:600px; height:250px; background-color:white;"></div>
</body>
</html>