Bug 146570 - Excessive memory consumption with certain xlsb files
Summary: Excessive memory consumption with certain xlsb files
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf, wantBacktrace
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2022-01-04 19:07 UTC by Кирилл Фролов
Modified: 2022-10-23 12:44 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Xlsb file (368.10 KB, application/vnd.ms-excel.sheet.binary.macroEnabled.12)
2022-01-04 19:09 UTC, Кирилл Фролов
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Кирилл Фролов 2022-01-04 19:07:34 UTC
Description:
Excessive memory consumption when I try to run RaytracerInExcel_CopyFormulae.xlsb from  https://github.com/s0lly/Raytracer-In-Excel
Excel 2019 runs this with approximately 850 megabytes of memory
Libreoffice calc used 7 gigabytes

Steps to Reproduce:
1. Download file from https://github.com/s0lly/Raytracer-In-Excel/raw/master/RaytracerInExcel_CopyFormulae.xlsb
2. open file.
3. Open objects tab.
4. copy Row 24 in the "Objects" tab, and paste it on to Row 25 to Row 14405 inclusively

Actual Results:
Libreoffice used 7 gigabytes of memory.

Expected Results:
Libreoffice uses 800 megabytes of memory


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Skia is enabled
Comment 1 Кирилл Фролов 2022-01-04 19:09:48 UTC
Created attachment 177312 [details]
Xlsb file
Comment 2 Roman Kuznetsov 2022-01-04 20:05:03 UTC
I confirm the memory leak in

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1be170d0629cf761f0ee4173007a3c021966546e
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

and in

Version: 5.2.7.2
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: ru-RU (ru_RU); Calc: group
Comment 3 m_a_riosv 2022-01-05 18:22:10 UTC
I can't find from where the 800 expected comes.

Only opening the file, about 585 MB.
After paste and after a while it is reduced to 2,5 GB, without touch nothing.
After a hard recalc 1,7 GB, takes several minutes.
So I don't know if it is really a bug or a possibility of enhancement.

BTW, there are a lot of formulae with OFFSET() which is a volatile function, maybe where possible replace it with INDEX() could help a bit on the calculation's speed, and perhaps SUM() in arrays with SUMPRODUCT().
Comment 4 Roman Kuznetsov 2022-10-23 12:44:23 UTC
Memory leak still here and it became even worse becasue we have today 16384 columns on sheet by default

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