Bug 151897 - Deleting contents of cells in a Calc column takes an hour EDITING
Summary: Deleting contents of cells in a Calc column takes an hour EDITING
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.2.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-04 11:55 UTC by David Lynch
Modified: 2022-11-06 07:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Exhibits bug (35.44 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-11-04 11:59 UTC, David Lynch
Details
Sample file with TEXTJOIN instead CONCAT (41.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-11-05 01:17 UTC, m_a_riosv
Details
Sample file with INDIRECT instead INDEX (40.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-11-05 17:17 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Lynch 2022-11-04 11:55:27 UTC
Description:
See attached spreadsheet. Deleting a single cell in column A takes 25 seconds. Deleting the whole column A about an hour.

Steps to Reproduce:
Open spreadsheet, select column A, [Delete]

Actual Results:
As expected with a hour's delay.

Expected Results:
No delay.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Delay about 20 minutes in 5.4. 
Same results in safe mode.
Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded
Comment 1 David Lynch 2022-11-04 11:59:00 UTC
Created attachment 183408 [details]
Exhibits bug
Comment 2 m_a_riosv 2022-11-05 01:17:50 UTC
Created attachment 183425 [details]
Sample file with TEXTJOIN instead CONCAT

Seems the issue is with CONCAT function in array context. Instead TEXTJOIN is very quick doing the same.
Attached sample file with TEXTJOIN
Comment 3 David Lynch 2022-11-05 09:49:18 UTC
On my system, the TEXTJOIN and CONCAT versions take the same time, about 61 minutes on each.
Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded
Comment 4 m_a_riosv 2022-11-05 10:36:31 UTC
Maybe OpenCL makes the difference. Seems it's not active in your configuration.
Menu/Tools/Options/LibreOffice/OpenCL.

With TEXTJOIN instantly.
Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL
Comment 5 David Lynch 2022-11-05 13:11:45 UTC
I don't understand why our experience is so different. 
I have taken the TEXTJOIN version you loaded and enabled OpenCL on three different versions of Libreoffice on three different hardware platforms. I get slow performance always.

About an hour on
Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: CL

About 40 minutes on
Version: 5.4.7.2 (x64)
Build ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
Locale: en-US (en_US); Calc: CL

About 1 hour 20 minutes on
Version: 7.4.0.3 (x64) / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: CL
Comment 6 m_a_riosv 2022-11-05 17:17:22 UTC
Created attachment 183429 [details]
Sample file with INDIRECT instead INDEX

Sorry, I was doing something no in the right way to test.

Deleting a cell with data in column A:
- 20 with CONCAT.
- 18 with TEXTJOIN.

The issue, I don't think it's a bug, but how the formula works to get the array to analyze the word.

ROW($A$1:INDEX($A:$A;LEN(A2)), is slow, I think, because all data it's iterated inside INDEX, only to force the array with the word length.

ROW(INDIRECT("1:"&LEN(A2))), also force the array, but without such calculate cost.
Comment 7 David Lynch 2022-11-06 07:06:36 UTC
Thanks, that worked. I'd assumed, wrongly, that using a volatile function, INDIRECT, was slower than the non-volatile, INDEX.