-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The NewStyle(style *Style) memory replication of too many times #1505
Comments
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. About this case pprof sample: |
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。
The text was updated successfully, but these errors were encountered: