A user has reported a strange problem, where after upgrading to ie 11, jquery.dataTables are very slow (20 - 40 seconds) to render. There are approximately 400 results, which seems resonable. And it runs VERY quickly in Chrome and FF.
After doing some diving, it turns out that any call to table sorter is causing server slowness.
We're using 1.9.4, although attempts at upgrading to 1.10 have not shown any performance improvements either.
The code is very straightforward:
$('#results_table').dataTable({
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0, 1, 12 ] },
{ 'sType': 'currency', 'aTargets': [8] }
],
"aaSorting": [[19, 'asc'], [18, 'asc'], [16, 'desc'], [4, 'desc'], [13, 'desc'], [5, 'desc'], [14, 'desc'], [15, 'desc'], [3, 'asc'], [6, 'desc']]
});
Any thoughts on improvements would would welcome.
This isn't exactly a fix, but it is a good work around. I switched to building an array of data and attaching that to dataTables instead of building dom elements.
Example:
$('#results_table').dataTable({
"aaData":[[attrs], [attrs]], // an array of row data
"aaSorting": [[19, 'asc'], [18, 'asc']],
"aoColumns": [
{ "sClass": "center" },
//... other class definitions
]
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With