From 9fe267ffcfa06545223160cdb8c35cd91163730e Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 24 Oct 2019 09:14:33 -0500 Subject: Pre-allocate some memory when reading files (#510) --- excelize_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'excelize_test.go') diff --git a/excelize_test.go b/excelize_test.go index 7b6b674..8d7e7f7 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -1278,3 +1278,9 @@ func fillCells(f *File, sheet string, colCount, rowCount int) { } } } + +func BenchmarkOpenFile(b *testing.B) { + for i := 0; i < b.N; i++ { + OpenFile(filepath.Join("test", "Book1.xlsx")) + } +} -- cgit v1.2.1