improve(sort): don't sort subrows less than 2 characters (#1449)

it improves performance because cuts a lot of sorting manipulations
This commit is contained in:
Eugene Krevenets 2019-08-15 16:11:12 +02:00 committed by Tanner Linsley
parent d4303a2468
commit c77ffacdc9

View File

@ -252,7 +252,7 @@ function useMain(instance) {
// If there are sub-rows, sort them
sortedData.forEach(row => {
if (!row.subRows) {
if (!row.subRows || row.subRows.length <= 1) {
return
}
row.subRows = sortData(row.subRows)