1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

Fix - performance: Don't extend the passed in data a second time - its a waste of time

This commit is contained in:
Allan Jardine 2012-02-26 19:12:11 +00:00
parent 126a4fe44e
commit 5479600611
2 changed files with 4 additions and 6 deletions

View File

@ -445,9 +445,8 @@
/* Create the object for storing information about this new row */
var iRow = oSettings.aoData.length;
var oData = $.extend( true, {}, DataTable.models.oRow, {
"_aData": aDataIn
} );
var oData = $.extend( true, {}, DataTable.models.oRow );
oData._aData = aDataIn;
oSettings.aoData.push( oData );
/* Create the cells */

View File

@ -20,9 +20,8 @@ function _fnAddData ( oSettings, aDataSupplied )
/* Create the object for storing information about this new row */
var iRow = oSettings.aoData.length;
var oData = $.extend( true, {}, DataTable.models.oRow, {
"_aData": aDataIn
} );
var oData = $.extend( true, {}, DataTable.models.oRow );
oData._aData = aDataIn;
oSettings.aoData.push( oData );
/* Create the cells */