When dealing with large datasets, the performance slowdown on re-populating the select dropdowns on any change in the datatable redraw is significant and the cost is exponential. In a test on a table with 10 columns and 11k rows, the load time goes from 8sec to 25sec in Firefox (no firebug). Furthermore when using the sorting plugin and sorting, this triggers a redraw which slows down sorts significantly as well.
While I understand the helpfulness of maintaining updated filterable values, I would recommend adding a way to make this function called more selectively and leave that option up to the developer to trigger manually - such as on a filter selection.
I've commented out the fnDraw() below and this greatly speeds loading and sorts.
oDataTableSettings.aoDrawCallback.push( {
name: 'ColumnFilterWidgets',
fn: function() {
$.each( me.aoWidgets, function( i, oWidget ) {
//oWidget.fnDraw();
} );
}
} );
When dealing with large datasets, the performance slowdown on re-populating the select dropdowns on any change in the datatable redraw is significant and the cost is exponential. In a test on a table with 10 columns and 11k rows, the load time goes from 8sec to 25sec in Firefox (no firebug). Furthermore when using the sorting plugin and sorting, this triggers a redraw which slows down sorts significantly as well.
While I understand the helpfulness of maintaining updated filterable values, I would recommend adding a way to make this function called more selectively and leave that option up to the developer to trigger manually - such as on a filter selection.
I've commented out the fnDraw() below and this greatly speeds loading and sorts.
oDataTableSettings.aoDrawCallback.push( {
name: 'ColumnFilterWidgets',
fn: function() {
$.each( me.aoWidgets, function( i, oWidget ) {
//oWidget.fnDraw();
} );
}
} );