-
-
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
AddComment used too many memory ( more than 10GB for only 100 comments) #1310
Comments
Thanks for your issue. I have test with your attachment and get runtime memory usage by |
@xuri 你这个函数可能不太准,开个 top 看一下,处理100条就很慢,而且内存明显飙升 我的操作系统是 centos 7.9 , Go 版本 1.6 / 1.8/ 1.9 都试过,都有问题 |
The |
I closed this issue. If you have any questions, please let me know to reopen this anytime. |
@xuri 是 1.16 / 1.18/ 1.19 , 上面打错了 |
@xuri I think i've found what's wrong. https://github.com/qax-os/excelize/blob/master/comment.go#L236 It's ok when you create a new file, add some comments, and save it. But when you reopen that file, and append some comments, it loads the existing shapes from so, the ploblem is : The existing shapes should only load once ! Dont modify and just run this code: test2.zip , then unzip the 20220808.xlsx file, you would get a 2GB vml file, which is crazy for just 100 comment !!! |
I've made a fix for this, tested locally and works fine |
Thanks for your feedback, I've accepted pull request #1311, and this patch will be released in the next version. |
we added about 100 comments in 5 batch, but it use too many memory, like more than 10GB.
code and files are in the attachment
test1.zip
The text was updated successfully, but these errors were encountered: