fnAddData effects speed of page load when records are 30-40K
fnAddData effects speed of page load when records are 30-40K
umair_malik
Posts: 7Questions: 3Answers: 0
i'm adding data in datatable dynamically by using fnAddData and fnDraw functions, it's working as required but page took 10-20 seconds in loading.is there any way which speed it up? my code is as follow:
$(window).load(function() {
$.ajax({
type: "GET",
url: "filters.php",
data: {limit: 10000, start_from: (i * 10000)},
success: function(response) {
var array = JSON.parse(response);
Object.keys(array).forEach(function(key) {
oTable.fnAddData([
array[key][1],
array[key][2],
array[key][3],
array[key][4],
array[key][5],
array[key][6],
array[key][7],
array[key][8],
array[key][9],
array[key][10],
array[key][11],
array[key][12],
array[key][13],
array[key][14],
array[key]['link']
], false);
});
oTable.fnDraw();
},
datatype: 'json'
});
});
This discussion has been closed.