Issues with Slow Sorting on Data Tables 1.9.3

Issues with Slow Sorting on Data Tables 1.9.3

garrettwgarrettw Posts: 1Questions: 0Answers: 0
edited September 2012 in TableTools
Is there any way to speed up Column Sorting.

My returned data set sizes max out currently at around 4000 records, but there exists a noticeable waiting time of 1 second on Chrome and 3-5 seconds on IE8 when a column is sorted.

My data table init options are:
"bDestroy": true,
"bProcessing": true,
"bAutoWidth": false,
"aaData": source,
"iDisplayLength": 400,
"aLengthMenu": [[25, 50, -1], [25, 50, "All"]],
//"bPaginate": false,
"sDom": 'R<"H"fr>t<"F"ip<',
"bJQueryUI": true,
"aaSorting": [],
"aoColumns": [
{ "sTitle": "COL1", "sWidth": "10%"},
{ "sTitle": "COL2", "sWidth": "10%" },
{ "sTitle": "COL3", "sWidth": "25%" },
{ "sTitle": "COL4", "sWidth": "15%" },
{ "sTitle": "COL5", "sWidth": "10%" },
{ "sTitle": "COL6", "sWidth": "10%" },
{ "sTitle": "COL7", "sWidth": "20%" }
],
"fnRowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$(nRow).attr('id', "row-" + aData[0]);
return nRow;
}

Thanks!

Replies

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    > $(nRow).attr('id', "row-" + aData[0]);

    That's not going to help. Setting the id of 400 elements on every draw. Will make a little bit of difference at least.

    You might want to also try the 1.9.4.dev nightly of DataTables which has a number of performance enhancements which might help.

    Allan
This discussion has been closed.