Closed Iwark closed 5 years ago
copy costs when you Update to add rows in a for-range for example.
copy
Update
func (sheet *Sheet) Update(row, column int, val string) { if uint(row)+1 > sheet.newMaxRow { sheet.newMaxRow = uint(row) + 1 } if uint(column)+1 > sheet.newMaxColumn { sheet.newMaxColumn = uint(column) + 1 } //... copy(newRows[i], sheet.Rows[i]) }
Here, instead of +1, we can consider adding several rows/columns to reduce copy
+1
or, just add added amount of rows/columns to sheet.Rows/Columns might work instead of copying all the cells
copy
costs when youUpdate
to add rows in a for-range for example.Here, instead of
+1
, we can consider adding several rows/columns to reducecopy
or, just add added amount of rows/columns to sheet.Rows/Columns might work instead of copying all the cells