Bug 144249 - Deleting 10.000 rows column in a spreadsheet: 15 sec with 4.1| 10 sec up to 300+ sec with 6.2| 130 sec with 7.3
Summary: Deleting 10.000 rows column in a spreadsheet: 15 sec with 4.1| 10 sec up to 3...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.8.2 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.2.2
Keywords: bibisected, bisected, perf, regression
Depends on:
Blocks:
 
Reported: 2021-09-01 21:21 UTC by Telesto
Modified: 2021-09-13 12:07 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (468.14 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-09-01 21:22 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-09-01 21:21:51 UTC
Description:
Deleting a column in a spreadsheet: 15 seconds with 4.0| 45 second with 4.4.7.2| 120 seconds with 7.3

Steps to Reproduce:
1. Open the attached file
2. Delete column B and wait..


Actual Results:
With 4.0 -> 15 seconds
With 4.1 -> Crash
With 4.4.7.2 -> 45 seconds
With 7.1 -> 90 seconds
With 7.3 -> 90 seconds


Expected Results:
15 seconds would be nice.. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 05ff3d67d0e2e436406786c949eb7cfca107ba33
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 2021-09-01 21:22:07 UTC
Created attachment 174709 [details]
Example file
Comment 2 Telesto 2021-09-02 20:14:11 UTC
@David
You're spreadsheet pretty good at unmasking perf issues ;-)
Comment 3 Timur 2021-09-03 08:33:44 UTC
B column values are used to calculate C, and D uses C. But MSO deletes in 2 secs. 
My Linux is slower but there's a difference.

43all oldest   13 sec
43all master:  29 sec
41max oldest:  15 sec
41max master:  22 sec
43max oldest:  29 sec
52 master:     17 sec
60 master:     30 sec
62 before:     10 sec
62 master:    300+ sec
63 master:    300+ sec
71 master:    300+ sec
7.3+          130 sec

LO never was instant calculating "Adapt row height". 
With all slow downs, it was fast in 6.2 as of commit 1e55a47e89a9d9d6cf9cb3993484022aaf2c097b (not the bad one), but it went very slow until the master.
7.3+ is faster than 7.1 but it's nowhere near proper time in 6.2.
Comment 4 Timur 2021-09-03 09:07:29 UTC
LO 6.2 before had wrong behavior of not setting cells (using column B) as REF. 
This commit fixed that but totally slowed down deletion of columns, so much I have to stop LO.

commit 838fad87c9785f45f81896c03df32a4b83033655
Date:   Tue Jun 12 17:26:18 2018 +0200
    source sha:2926c9e40e17a806e29b95d08ddf186904103d33
    pre sha:c8a739a2c84f45f878d2ae75eaf16a2f814d1c6e

commit	2926c9e40e17a806e29b95d08ddf186904103d33	[log]
author	Luboš Luňák <l.lunak@collabora.com>	Tue Jun 12 2018
committer	Tor Lillqvist <tml@collabora.com>	Tue Jun 12 2018

don't use opencl with deleted cells

Without this testFormulaRefUpdateDeleteAndShiftLeft2 fails with OpenCL
enabled (and the mnOpenCLMinimumFormulaGroupSize check disabled).
If I'm getting it right, anything working with #REF! (=invalid reference)
should result in #REF! too, but without this fix the function effectively
converted the #REF! to an empty cell.

CC: Lubos. Please see this.
Comment 5 Timur 2021-09-03 09:11:53 UTC
I didn't have OpenCL turned on, but also with it 7.3+ deletes in 105 sec.
Comment 6 Commit Notification 2021-09-10 08:50:26 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b4c1bb2f91e9ae47820c289e2c08f640a958cf05

cache FormulaError::NoRef error string (tdf#144249)

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2021-09-13 10:54:48 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/3d190edd71ac8f5a78b683ab82e5fa23e198afbb

cache FormulaError::NoRef error string (tdf#144249)

It will be available in 7.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Timur 2021-09-13 12:07:52 UTC
It's 10 seconds for me again, as in good ol' times. 
Would be good to know how Excel does in in just 1 second.