Bug 133409 - Memory usage increases on every file save (and every every page order change)
Summary: Memory usage increases on every file save (and every every page order change)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2020-05-26 14:49 UTC by Telesto
Modified: 2024-02-09 10:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (377.64 KB, application/vnd.oasis.opendocument.graphics)
2020-05-26 14:49 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-05-26 14:49:05 UTC
Description:
Memory usage increases on every file save

Steps to Reproduce:
1. Open the attached file
2. Drag pag 2 to pag 1 position 
3. Save
4. Repeat 2/3 -> Notice a bump of 30 MB on every save

Actual Results:
30 MB memory usage increase on every save

Expected Results:
Seems off to me


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha1+ (x64)
Build ID: 21875558f6c478f07d68ff39e025d7ffd451674f
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

and in
3.3.0
Comment 1 Telesto 2020-05-26 14:49:21 UTC
Created attachment 161299 [details]
Example file
Comment 2 Buovjaga 2020-09-04 18:25:50 UTC
Repro, but only on Windows

Version: 7.1.0.0.alpha0+ (x64)
Build ID: baa84b5b4d287da0f00fc3fbf11f464f267c9202
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: default; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded
Comment 3 QA Administrators 2022-09-05 03:36:59 UTC Comment hidden (obsolete)
Comment 4 Roman Kuznetsov 2022-09-10 12:24:31 UTC
Still repro in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 88d7aa8ab79b1197191b5eb24a3b67d313797026
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

and it became even worse -> I saw bump of 80 MB on every save
Comment 5 Tex2002ans 2024-02-09 05:24:21 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:

~516 MB = Initial load
~546 MB = After swap+save

Then I continued swapping Pages 1<->2 (doing Steps 1-4), and this was each save after:

558 MB = +12 MB
649 MB = +91 MB
714 MB = +65 MB
777 MB = +63 MB

But I don't believe it's the "saving" that's doing it.

The vast bulk of it could be the normal Undo/Redo stack. Because after I flip the pages, LO's RAM usage seems to rise by ~ that amount too.

- - - - - -

If I just did a:

0. Open attachment 161299 [details] (ODG document).
1. Save.
2. Repeat Step 1.

This was my RAM usage on each save:

403 MB
452 MB = +49 MB
455 MB = +3 MB
460 MB = +5 MB
448 MB = -12 MB

but the second I swapped Page 2->1:

512 MB = +64 MB

and an extra save:

519 MB = +7 MB
Comment 6 Telesto 2024-02-09 10:23:55 UTC
Steps to Reproduce:
1. Open LibreOffice
2. Tools -> Options -> Advanced -> Expert Configuration -> Set Undo steps from 100 to 0 (to exclude Undo history)
3. Restart LibreOffice
4. Open the attached file
5. Make small modifications: pag 2 to pag 1 position or move the Légende (on some page) to different position. Pressing save without modification has does exhibit the issue as far I'm aware.
6. After each modification. Press Save or CTRL+S
7. 12-13 increases memory usage with 120 MB

Memory bump is slightly irregular. Sometimes more compared to others.

Why is this a problem? It's maybe 7-10 MB on each save cycle.. 

A) This becomes an issue when you're editing something and auto-save saving the progress. 
B) People might work on multiple documents at the same time. So this starts to add up
C) It's probably not limited to Draw. Increased memory usage does also happen with Calc/Writer.
D) It also happens simple shape, change & save. The bumps are only smaller. Apparently different ram allocation sizes are used on save depending on file size or complexity? 

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4d381b54d1c598c181b4a21a8bf0db86eb4668d1
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded