Bug 123542 - Document with comments has a high memory usage after saving file
Summary: Document with comments has a high memory usage after saving file
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
: 153301 (view as bug list)
Depends on:
Blocks: Calc-Comments Memory
  Show dependency treegraph
 
Reported: 2019-02-18 13:31 UTC by Telesto
Modified: 2024-02-09 04:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (62.60 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-02-18 13:32 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2019-02-18 13:31:51 UTC
Description:
Document with comments has a high memory usage after saving file

Steps to Reproduce:
1. Open the attached file (look at the memory usage)
2. Press save -> look after memory usage afterwards

Actual Results:
490 mb

Expected Results:
Would expect 250 mb or so (after saving finished


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in Master

and in
Version: 6.0.2.0.0+
Build ID: 55b37cc3ade30257858515b1a062ff9130488a5f
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: nl-NL (nl_NL); Calc: C

Crashing in
5.3
4.4.7.2
Comment 1 Telesto 2019-02-18 13:32:05 UTC
Created attachment 149369 [details]
Example file
Comment 2 mulla.tasanim 2019-03-16 23:35:17 UTC
Hello Telesto

Thank you for reporting the bug.

I am seeing memory usage is high after saving the file

Memory Usage when File opened : 142.2 MB
Memory Usage after saving file : 644.4 MB
in following version-

Version: 6.2.1.2 (x64)
Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL



Memory Usage when File opened : 133.4 MB
Memory Usage after saving file : 635.8 MB
in following version-

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 91cdf22b88a4f7bec243c8fb187627e766d3294c
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-08_00:38:10
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 3 Xisco Faulí 2019-03-22 12:12:06 UTC
As long as there's no freezing / hang, high memory problem can be deal as a low priority bug
Comment 4 b. 2019-05-30 19:32:38 UTC
@xisco: 

reg. comment #3: 

1. rise the number of comments and you'll produce freezes, crashes and so on as many as you like, 

2. the bug 'performance issues caused by comments' is 5 years old now, imho after that time it's critical to delay further as 'low priority', 

3. see list below ... 

there is a list of 121 bugs for comments in META #101216, 90 of them unresolved, 31 'resolved', 

the following are related to performance, 

https://bugs.documentfoundation.org/show_bug.cgi?id=60418
Bug 60418 - FILEOPEN and EDITING particular .odt with excessive lots of Comments causes heavy CPU and memory load, can crash on saving (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=76324
Bug 76324 - CALC becomes very slow with 5000+ comments (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=88070
Bug 88070 - FILESAVE: "The File could not be written" unable to save file with 3200+ comments

https://bugs.documentfoundation.org/show_bug.cgi?id=88194
Bug 88194 - freeze when paste into lots of cells (cell with comment) (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=97698
Bug 97698 - Calc very slows when spreadsheet has many notes (comments) and LO crash (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=105499
Bug 105499 - Editing of .ods calc document with many comments causes high CPU load, can crash on saving (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=106385
Bug 106385 - FILEOPEN: Crash when clicking on a spreadsheet with many comments (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=113599
Bug 113599 - calc hangs when dealing with too many comments (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=114377
Bug 114377 - Crash if pasting/copying calc cells with comments (5000 lines) (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=119075
Bug 119075 - Slow scrolling after saving a document and switching sheets back and forth 

https://bugs.documentfoundation.org/show_bug.cgi?id=119636
Bug 119636 - XLSX file with 1500 comments in cells opens slow (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=119650
Bug 119650 - FILESAVE: It takes >2:40 to save a small spreadsheet with comments and more than 400Mb in extra memory usage 

https://bugs.documentfoundation.org/show_bug.cgi?id=123417
Bug 123417 - File with lots of comments opens slower compared to LibO 4.4.7.2 (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=123418
Bug 123418 - Showing all comments takes longer compared with 4.4.7.2 (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=123419
Bug 123419 - Scrolling around in a document with lots of comment shown very slow compared to 4.4.7.2 (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=123529
Bug 123529 - High CPU when scrolling in a calc sheet with lots of comment indicators (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=123542#add_comment
Bug 123542 - Document with comments has a high memory usage after saving file (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=124692
Bug 124692 - 6.3.0.0.alpha0+ calc slow in reaction on mouseclicks, editing (edit) 

https://bugs.documentfoundation.org/show_bug.cgi?id=125545
Bug 125545 - performance issue caused by comments? (edit) 

inherited from OO3.x, 

results from calculating text boxes, 

how it feels to be an open source project maintainer
Comment 5 QA Administrators 2021-06-01 04:30:17 UTC Comment hidden (obsolete)
Comment 6 Stéphane Guillou (stragu) 2023-02-01 11:29:27 UTC
Reproduced on Ubuntu 20.04 as well, going from ~192 mb before saving to 710+ mb after saving, sometimes hanging for a few seconds. High memory usage remains.

Version: 7.4.5.1 / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ec4babad021218b75dfe8534985d7db525edde69
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

OOo 3.3 doesn't go straight away as high in memory usage but hangs more drastically and very slowly goes up and up in memory usage, starting from 78 mb. I killed it at 150 mb after 5 minutes, memory still crawling up and Calc frozen.

Also happens with gen VCL so likely not the same as bug 119075.
Comment 7 Ademas 2023-02-01 15:06:34 UTC
> 2. the bug 'performance issues caused by comments' is 5 years old now, imho
> after that time it's critical to delay further as 'low priority'

A few years later and the bug is still here. I have just posted Bug 153301 with a different facet of what seems to be the same bug.
Comment 8 Ademas 2023-02-01 15:16:08 UTC
*** Bug 153301 has been marked as a duplicate of this bug. ***
Comment 9 Tex2002ans 2024-02-09 04:51:05 UTC
Retested in:

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

- - -

Followed steps in Comment #0:

~397 MB = Initial load
~796 MB = Peak while saving
~733 MB = After save