Bug 108617 - Memory usage keeps increasing when adding formatting and removing it again with clear direct formatting
Summary: Memory usage keeps increasing when adding formatting and removing it again wi...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2017-06-18 12:21 UTC by Telesto
Modified: 2017-06-27 14:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file (6.38 MB, application/vnd.oasis.opendocument.spreadsheet)
2017-06-18 12:26 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-06-18 12:21:52 UTC
Description:
Memory usage keeps increasing when adding formatting and removing it again with clear direct formatting

Steps to Reproduce:
1. Launch Calc and take notice of the initial memory usage
2. Open the attached file (based on attachment 121732 [details] bug 102364)
3. Select column A, B, C, D, E
4. Apply the default red font color
5. Remove the formatting again (CTRL+M) -> 50MB increase
6. Repeat the steps.. Notice that it will increase every time

Second part
7. Save the file
8. Close the document (go back to start center). Notice that there is a build up of used memory which isn't free-ed even after closing the document


Actual Results:  
Memory usage is increasing

Expected Results:
Memory usage shouldn't this fast


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: 6.0.0.0.alpha0+
Build ID: cbf371e07fd5dea1ea08a1f299360d1273961ebd
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-06-14_23:13:57
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Telesto 2017-06-18 12:26:51 UTC
Created attachment 134107 [details]
Example file
Comment 2 Telesto 2017-06-27 12:18:44 UTC
Normal behavior since 3.5.7
Comment 3 Buovjaga 2017-06-27 14:09:37 UTC
(In reply to Telesto from comment #2)
> Normal behavior since 3.5.7

It definitely seems to be related to the undo. You can test it by opening Tools - Options - LibO - Advanced - Expert config: org.openoffice.Office.Common/Undo

The default value for "Steps" is 100. I set it to 3 and indeed the memory growth is hitting a wall with that setting.

https://help.libreoffice.org/Common/Memory#Number_of_undo_steps