mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-01 13:24:10 +01:00
Modified: The 'i' counter that was in the sort loop was outside the function scope, so the JS engine would need to go back up a level in its scope chain. Not a big thing, but any speed in the sorting function is welcome
This commit is contained in:
parent
4c48650a25
commit
967e1419c1
8
media/js/jquery.dataTables.js
vendored
8
media/js/jquery.dataTables.js
vendored
@ -4707,12 +4707,12 @@
|
||||
*/
|
||||
var iSortLen = aaSort.length;
|
||||
oSettings.aiDisplayMaster.sort( function ( a, b ) {
|
||||
var iTest, iDataSort, sDataType;
|
||||
for ( i=0 ; i<iSortLen ; i++ )
|
||||
var k, iTest, iDataSort, sDataType;
|
||||
for ( k=0 ; k<iSortLen ; k++ )
|
||||
{
|
||||
iDataSort = aoColumns[ aaSort[i][0] ].iDataSort;
|
||||
iDataSort = aoColumns[ aaSort[k][0] ].iDataSort;
|
||||
sDataType = aoColumns[ iDataSort ].sType;
|
||||
iTest = oSort[ (sDataType?sDataType:'string')+"-"+aaSort[i][1] ](
|
||||
iTest = oSort[ (sDataType?sDataType:'string')+"-"+aaSort[k][1] ](
|
||||
_fnGetCellData( oSettings, a, iDataSort, 'sort' ),
|
||||
_fnGetCellData( oSettings, b, iDataSort, 'sort' )
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user