fnDraw slow while scrolling in IE8/9/10

fnDraw slow while scrolling in IE8/9/10

sdinesh21sdinesh21 Posts: 37Questions: 0Answers: 0
edited November 2013 in DataTables 1.9
Hi Allan,
I use datatables 1.9.4 for server side processing with Scroller which fetches around 6000 rows. The table is refreshed every 5 seconds, basically I call fnDraw(false) every 5 seconds. It works fine in Firefox/Chrome but lags for 2 seconds in IE if I scroll while fnDraw is being executed.

[code]
$("#" + tblName).dataTable( {
"sScrollY": "300px",
"sScrollX": "200px",
"sAjaxSource": "../../../servlet",
"bServerSide": true,
"bDestroy": true,
"bProcessing": true,
"fnServerParams": function ( aoData ) {
for ( var i in servArgv ) {
aoData.push( servArgv[i] );
}
},
sDom: 'RfrtS',
"aoColumns": aoColumnDef ,
"aaSorting": [[ 5, 'asc' ]],
"fnInitComplete": function (oSettings ) {
setAssetContextMenu("#" + tblName, menu );
},
"fnDrawCallback": function ( oSettings ) {
$("div.statusBar"+id).addClass("statusBar").html(' Total: ' + oSettings._iRecordsTotal +
' (Selected: ' + iWindows[id-1].selectedRows.length + ')');
},
"fnRowCallback": function( nRow, aData) {
if (iWindows[id-1].selectedRows != null && iWindows[id-1].selectedRows.length != 0 && $.inArray((nRow.id).toString(), iWindows[id-1].selectedRows) >= 0) {
$(nRow).addClass('row_selected');
}
}
} );
[/code]

[code]
setInterval(function() {
$("#"+tblName).dataTable().fnDraw(false);
}, 5000);
[/code]

Could you please suggest what could be hampering the performance in IE?

Replies

  • sdinesh21sdinesh21 Posts: 37Questions: 0Answers: 0
    Hi Allan,

    Did you get a chance to check this? Please assist.
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Sorry no, I didn't see this one before. I'd suggest that its probably asking a bit must of IEs slow Javascript engine to be honest. If you remove the fnDrawCallback and fnRowCallback, does that help?

    Allan
  • sdinesh21sdinesh21 Posts: 37Questions: 0Answers: 0
    Allan,
    Removing callback functions did not help. Let me know if there is further tuning that can be done. Thanks.
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    I can't really say without being able to see a test page showing the problem I'm afraid.

    Allan
This discussion has been closed.