**JQXTree ** is loading slow with 500 records. Below is my code snipset.
It is taking around 3-4 seconds to load 500 records which is very slow as it is hampering my performance. Is there any alternative approach we can follow to reduce the binding time.
var source = {
datatype: "json",
datafields: [{ name: "ClassRid", type: "int" }, { name: "ParentClassRid", type: "int" }, { name: "ClassName", type: "string" }, { name: "ClassLabel", type: "string" }],
id: "ClassRid",
localdata: dataSource,
async: true,
hasThreeStates: false
};
var dataAdapter = new $.jqx.dataAdapter(source);
dataAdapter.dataBind();
var records = [];
if (dataSource.length > 0)
records = dataAdapter.getRecordsHierarchy("ClassRid", "ParentClassRid", "items", [{ name: "ClassLabel", map: "label" }, { name: "ClassRid", map: "value" }, { name: "ClassName", map: "ClassName" }]);
$("#treeId").jqxTree({ checkboxes: true, source: records, width: '100%', height: 220 });
It is taking around 3-4 seconds to load 500 records which is very slow as it is hampering my performance. Is there any alternative approch we can follow to reduce the binding time.
The performance issue you’re experiencing is due to the very deep tree structure (500) you can't improve your current case. But what you can improve is to minimize the layer of your tree structure to increase performance.
Example: https://jsfiddle.net/mbszt7ek/
html code
javascript + jquery code