Skip to content

Commit

Permalink
delete row small performance improvement
Browse files Browse the repository at this point in the history
there are deleteions done on _sheetData but later on this is overwritten by _data, therefore these operations are useless.
  • Loading branch information
splohmer authored Apr 3, 2024
1 parent 9e1734a commit 9f6c559
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/src/sheet/sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,8 @@ class Sheet {
if (rowKey < rowIndex && _sheetData[rowKey] != null) {
_data[rowKey] = Map<int, Data>.from(_sheetData[rowKey]!);
}
if (rowIndex == rowKey && _sheetData[rowKey] != null) {
_sheetData.remove(rowKey);
}
if (rowIndex < rowKey && _sheetData[rowKey] != null) {
_data[rowKey - 1] = Map<int, Data>.from(_sheetData[rowKey]!);
_sheetData.remove(rowKey);
}
});
_sheetData = Map<int, Map<int, Data>>.from(_data);
Expand Down

0 comments on commit 9f6c559

Please sign in to comment.