Bug 133583 - Inserting new rows in a filed Calc sheet causes memory bumps of starting with +/-20 MB and more or less doubling for every row
Summary: Inserting new rows in a filed Calc sheet causes memory bumps of starting with...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2020-06-01 14:22 UTC by Telesto
Modified: 2024-02-20 21:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (14.39 MB, application/vnd.oasis.opendocument.spreadsheet)
2020-06-01 14:23 UTC, Telesto
Details
screenshot of mem usage (169.31 KB, image/jpeg)
2020-10-25 12:52 UTC, b.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-06-01 14:22:41 UTC
Description:
Inserting new rows in a filed Calc sheet causes memory bumps of starting with +/-20 MB and more or less doubling for every row

Steps to Reproduce:
1. Open the attached file
2. Select row 10 and add a row
3. select row 20 and add a row
4. Select row 30 and add a row
5. Select row 30 and add a row

Note first 2 or 3 rows don't cause memory bumps, as far I can tell.. 

Actual Results:
50-90 MB bump for every row added

Expected Results:
More or less table memory increase.. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.3.2
Build ID: libreoffice-6.4.3.2-snap1
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

and in
Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89) (Linux)
Comment 1 Telesto 2020-06-01 14:23:20 UTC
Created attachment 161494 [details]
Example file
Comment 2 Telesto 2020-06-04 10:01:56 UTC
FWIW: Tracking changes is behaving as I would expect undo to behave.

Tools -> Options -> Advanced -> Expert settings - search for Undo set it to 0
Close Libo & Restart (to be sure that the changes take effect)

1. Open the attached file
2. Enable tracking changes 
3. Add a few rows & monitor memory usage
Comment 3 Buovjaga 2020-10-16 14:02:42 UTC
(In reply to Telesto from comment #0)
> Description:
> Inserting new rows in a filed Calc sheet causes memory bumps of starting
> with +/-20 MB and more or less doubling for every row
> 
> Steps to Reproduce:
> 1. Open the attached file
> 2. Select row 10 and add a row
> 3. select row 20 and add a row
> 4. Select row 30 and add a row
> 5. Select row 30 and add a row
> 
> Note first 2 or 3 rows don't cause memory bumps, as far I can tell.. 

They do cause bumps for me. The mem increase is *not* doubling for me. So for me the behaviour seems expected and normal.

Arch Linux 64-bit
Version: 7.1.0.0.alpha0+
Build ID: 9b34dc20b6946698ae6ce2d5d859885bfb444633
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 16 October 2020
Comment 4 b. 2020-10-25 12:52:01 UTC
Created attachment 166697 [details]
screenshot of mem usage

see ramp-up from inserting 15 rows at row 10, 20 .. 150 in sample file, 

tested with: 
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 586f6abee92af3cdabdce034b607b9a046ed3946
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: 

setting 'new'
Comment 5 b. 2020-10-25 12:54:18 UTC
didn't see 'doubling', but massive mem eating ... don't know if necc. for undo or similar, but would render calc unusable once mem full ...
Comment 6 QA Administrators 2022-10-26 03:36:04 UTC Comment hidden (obsolete)
Comment 7 Tex2002ans 2024-02-20 21:57:04 UTC
Still reproduce 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/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

using ODS attachment in comment 1 + Inserting a new row every 10th spot.

- - - - - - -

Here were my measurements in:

LibreOffice 24.2.0

418 MB = Initial open
500 MB = +82 = Row 10
575 MB = +75 = Row 20
652 MB = +77 = Row 30
727 MB = +75 = Row 40
802 MB = +75 = Row 50

Excel 365 (Version 2401, Build 17231.20236)

147 MB = Initial open
155 MB = +8  = Row 10
186 MB = +31 = Row 20
186 MB = 0   = Row 30
186 MB = 0   = Row 40
187 MB = +1  = Row 40

= = =

Note: In Excel, it seemed to:

- Jump about 30 MBs each time after initial "Insert Row"

but within a few seconds, quickly dropped/settled to the measurements above.

I also reopened/retested a few more times, and it seemed to raise RAM by ~1 MB per Inserted row after that.

= = =

So, each new Inserted row added:

- ~75 MBs for LibreOffice
- ~1 MB for Excel