Bug 133241 - Redo increases memory usage
Summary: Redo increases memory usage
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2020-05-21 18:21 UTC by Telesto
Modified: 2022-05-12 11:23 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-05-21 18:21:02 UTC
Description:
Redo increases memory usage

Steps to Reproduce:
1. Open attachment 160938 [details]
2. Copy Column D
3. Paste one by one until column S
4. CTRL+Z everything
5. CTRL+Y everything


Actual Results:
Memory usage increases

Expected Results:
Should stay the same?


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha1+ (x64)
Build ID: 442c7b95e2ee94b66a9854d0cb22f8ecb76532c6
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
Comment 1 Telesto 2020-05-21 18:36:50 UTC
@Mike
Not knowledge to assess if this is an issue or not.. However, looks a little like if undo information is generated for every redo.. or the results are recalculated.. with removing the old.. 

Again I really have no clue how this supposed to work. 

1. Open attachment 160938 [details]
2. Copy Column D
3. Paste one by one until column S
4. CTRL+Z everything
5. CTRL+Y everything
6. Repeat 4/5 - few times -> up it goes

Feel free to close this as NAB
Comment 2 b. 2020-05-26 11:35:52 UTC
repro: 

about ~300M program, ~100M - ~200M file, ~300M for 15 paste, 15 undo, 15 redos, on 6.2.8.2 win, and 7.0.0.0.a1+, 

if i'm right and @Noels comment https://bugs.documentfoundation.org/show_bug.cgi?id=125428#c30 applies here i'd say you are adding 10k to 160k of random 5 byte strings to the mentioned string pool on each action (all cells recalculated), thus i consider some memory consumption normal, 

the raw data for that might fit into 50 MB, even less considering duplicates, but some overhead - e.g. for formatting - is normal? 

just for nags like this it would be helpful to have a management which can track the use of references and release idle objects, but my vague idea is that the path referencer -> reference is 'direct' in C++, while finding the referencer(s) of an object is a search action ... ??? 

suggest 'minor' or 'wfm', there are other urgent problems ...
Comment 3 Buovjaga 2022-05-12 11:23:05 UTC
Still going up

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 172e208e6b0674f42c301c5ee5e280e9138ba1b4
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded Jumbo