Open zjfGH opened 1 year ago
Thanks for your issue. How many new styles did you create, how much did memory cost in your case? and what expected you want? Could you follow the issue templates to provide more details about this issue?
1.Each file to perform new styles twice, A total of 200 calls. 2.Consumes 2g 10 c when case running.
About this case pprof sample: pprof imgs.docx
Locality: NewStyle() -> f.getStyleID() -> range ss.CellXfs.Xf
styles.go:2116
code:
for xfID, xf := range ss.CellXfs.Xf { if getXfIDFuncs["numFmt"](numFmtID, xf, style) && getXfIDFuncs["font"](fontID, xf, style) && getXfIDFuncs["fill"](fillID, xf, style) && getXfIDFuncs["border"](borderID, xf, style) && getXfIDFuncs["alignment"](0, xf, style) && getXfIDFuncs["protection"](0, xf, style) { styleID = xfID return styleID, err } }
range and getXfIDFuncs will copy each of the xf elements, consumes a lot of performance。