From 89b85934f60ba0012f3de6da03eb12959e4b4b72 Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 27 Dec 2021 23:34:14 +0800 Subject: This closes #1096, memory usage optimization and another 4 changes - Unzip shared string table to system temporary file when large inner XML, reduce memory usage about 70% - Remove unnecessary exported variable `XMLHeader`, we can using `encoding/xml` package's `xml.Header` instead of it - Using constant instead of inline text for default XML path - Rename exported option field `WorksheetUnzipMemLimit` to `UnzipXMLSizeLimit` - Unit test and documentation updated --- errors.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'errors.go') diff --git a/errors.go b/errors.go index 4230c14..9460803 100644 --- a/errors.go +++ b/errors.go @@ -143,8 +143,8 @@ var ( // characters length that exceeds the limit. ErrCellCharsLength = fmt.Errorf("cell value must be 0-%d characters", TotalCellChars) // ErrOptionsUnzipSizeLimit defined the error message for receiving - // invalid UnzipSizeLimit and WorksheetUnzipMemLimit. - ErrOptionsUnzipSizeLimit = errors.New("the value of UnzipSizeLimit should be greater than or equal to WorksheetUnzipMemLimit") + // invalid UnzipSizeLimit and UnzipXMLSizeLimit. + ErrOptionsUnzipSizeLimit = errors.New("the value of UnzipSizeLimit should be greater than or equal to UnzipXMLSizeLimit") // ErrSave defined the error message for saving file. ErrSave = errors.New("no path defined for file, consider File.WriteTo or File.Write") // ErrAttrValBool defined the error message on marshal and unmarshal -- cgit v1.2.1