there is a problem when using these kind of .xlsx files
in GetRows funciton it will add all rows and it will allocate huge amount of memory and then it will use only 0:max elements untill GC clocks
makes it unable to run service with limited memory
add the following lines to (rows.go#L77):
fmt.Println(max)
fmt.Println(len(results))
read it normally and check the memory usage with this code after reading it:
var memStats runtime.MemStats
runtime.ReadMemStats(&memStats)
fmt.Printf("memory allocated: %d\n", memStats.Alloc)
runtime.GC()
runtime.ReadMemStats(&memStats)
fmt.Printf("memory allocated 2: %d\n", memStats.Alloc)
difference between 2 prints is the unnecessary allocation
there is a problem when using these kind of .xlsx files in GetRows funciton it will add all rows and it will allocate huge amount of memory and then it will use only 0:max elements untill GC clocks makes it unable to run service with limited memory
here is the file to reproduce it :
cost_center_matrix.xlsx
difference between 2 prints is the unnecessary allocation
https://github.com/qax-os/excelize/blob/master/rows.go#L61-L79