Extremly slow adding 5 collumns 500 rows over 100seconds

Extremly slow adding 5 collumns 500 rows over 100seconds

AdamSAdamS Posts: 14Questions: 3Answers: 0
edited July 2012 in General
Hi,

I have a datatable, that is fast loading web sql (local) data with 4 columns (5-6s), but now I have added an extra column that is editable it takes over that is extremely slow, it takes over 100 seconds to load. It takes around 25 seconds for 250 rows, that is over 1second per row.

Here is my datatable configuration:

var oTable = $('#tabelProduct').dataTable({
"aoColumnDefs": [
{ "sClass": "my_class", "aTargets": [ 4 ] }
],
"fnDrawCallback": function() {
$("td.my_class").editable(function(value, settings)
{
return(value);
},
{
indicator : 'Saving...',
tooltip : 'Click to Edit...',
autowidth : false
}
);
},
"bAutoWidth": false,
"iDisplayLength": 100
});

What performance optimizations can be done to load the page quicker? The issue is that now I have chrome telling me it's frozen and if I want to kill the page... this is a serious issue for our product that runs on PCs and Tablets, on tablets it crashes the iPad browser.

Replies

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    I don't see anything there that would slow DataTables down so much. If you remove the editable call, does that speed things up again? I suspect we might need a link to a test case with the issue.

    Allan
  • AdamSAdamS Posts: 14Questions: 3Answers: 0
    edited July 2012
    I changed the parameter to not draw ech line and call the draw at the end of all adds and now it works properlly thanks
  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    Good stuff, thanks for the feedback.
This discussion has been closed.