Datatable slow rendering when huge table html to datatable
Datatable slow rendering when huge table html to datatable
ArsalanQaiser
Posts: 6Questions: 5Answers: 0
Hello Everyone,
I have html table it's have 3000+ Rows. I don't want pagination. When i convert simple Html Table to Jquery Datatable so it's rendering very slow. page look like a unresponsive. after 1 to 1.5 minute every thing normal. as expected. how to fix this issue please help me Below is my code.
$('#testtable').DataTable({
"searching": false,
"info": false,
"paging": false,
select: true,
"processing": true,
dom: 'Blfrtip',
"order": [[1, "asc"]],
bInfo: false,
buttons: [
{
extend: 'excelHtml5',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function (indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
}
},
{
extend: 'csvHtml5',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function (indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
}
},
{
extend: 'pdfHtml5',
orientation: 'landscape',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function (indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
}
},
],
columnDefs: [{
orderable: false,
className: 'select-checkbox',
targets: 0
}],
select: {
style: 'multi+shift',
selector: 'td:parent'
},
"columns": [{
"targets": [0],
"sorting": false
}, {
"targets": [1],
}, {
"targets": [2],
}, {
"targets": [3],
}, {
"targets": [4],
}, {
"targets": [5],
}, {
"targets": [6],
}, {
"targets": [7],
}],
"lengthChange": false,
});
This discussion has been closed.
Answers
3k rows without paging is likely to be slow, but this section of the FAQ should help, it discusses various techniques to improve performance,
Cheers,
Colin