From 0f9170a03b9fe19c1c22687fba8bcbdfd69a6347 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 16 Apr 2019 01:50:16 -0500 Subject: Resolve #382, rewrite prepareSheetXML to scale linearly (#383) * Rewrite prepareSheetXML to scale linearly We don't need to backfill columns into every row for most purposes Provided makeContiguousColumns for setting styles where we do need it for a specific region. Added a benchmark to monitor progress. For 50,000 rows this went from about 11 seconds to 1 second. The improvements are more dramatic as the row/column count increases. * Assigning that row value was redundant --- rows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rows.go') diff --git a/rows.go b/rows.go index 7de18d3..ff268cf 100644 --- a/rows.go +++ b/rows.go @@ -446,7 +446,7 @@ func (f *File) InsertRow(sheet string, row int) error { return f.adjustHelper(sheet, rows, row, 1) } -// DuplicateRow inserts a copy of specified row (by it Excel row number) below +// DuplicateRow inserts a copy of specified row (by its Excel row number) below // // err := xlsx.DuplicateRow("Sheet1", 2) // -- cgit v1.2.1