Bug 117366 - Calc very slow on opening XLSX with a large table and Select All/Cut
Summary: Calc very slow on opening XLSX with a large table and Select All/Cut
Status: VERIFIED FIXED
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: target:7.4.0
Keywords: haveBacktrace, perf
Depends on:
Blocks: Cut-Copy
  Show dependency treegraph
 
Reported: 2018-05-01 09:04 UTC by Emil Tanev
Modified: 2022-03-07 10:25 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
file (24.89 MB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-05-01 09:04 UTC, Emil Tanev
Details
Valgrind trace from master (56.84 KB, text/plain)
2018-05-05 08:09 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2018-05-01 09:04:29 UTC
Created attachment 141806 [details]
file

Open the attached file
Select All via the top left button (between A and 1)
Right-click in the table and do a Cut
Issue: Calc hangs

https://screencast-o-matic.com/watch/cFhVjRbqit


Version: 6.1.0.0.alpha1 (x64)
Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: en-US (en_US); Calc: group
Comment 1 impreza233 2018-05-03 12:59:15 UTC
I can reproduce it on my machine too (same version of LibreOffice on Windows 10 x64). Calc crashes directly with OpenGL UI render, after some time of hanging. 

Versió: 6.1.0.0.alpha1 (x64)
ID de la construcció: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
Fils de CPU: 4; SO: Windows 10.0; Renderitzador de la IU: GL; 
Configuració local: ca-ES-valencia (ca_ES); Calc: group
Comment 2 Xisco Faulí 2018-05-04 10:11:49 UTC
Also reproduced if columns A to L are selected and cut. Also reproduced in multithreading

Version: 6.1.0.0.alpha1+
Build ID: 213f12be2cab2106dde4a0e859faaa8259627c1a
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

In previous versions, the file can't even be open, at least we can open it now...
Let's put it as Inherit from OOo.

@Buovjaga, would you mind creating a valgrind profile?
Comment 3 Buovjaga 2018-05-05 08:09:40 UTC
Created attachment 141902 [details]
Valgrind trace from master

Arch Linux 64-bit
Version: 6.1.0.0.alpha1+
Build ID: 03a4b6eb58b29c0ab4bb85f756923c46618d02ff
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 2nd 2018
Comment 4 QA Administrators 2019-05-06 02:45:40 UTC Comment hidden (obsolete)
Comment 5 impreza233 2019-05-06 16:03:17 UTC
It continues to be present. Version of Libreoffice 

Versión: 6.0.7.3
Id. de compilación: 1:6.0.7-0ubuntu0.18.04.5
Subprocs. CPU: 4; SO: Linux 4.18; Repres. IU: predet.; VCL: kde4; 
Configuración regional: es-ES (es_ES.UTF-8); Calc: group
Comment 6 Buovjaga 2021-05-03 09:56:55 UTC
Cutting everything finishes in 23 seconds for me with

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9c930c4f3109d123c0831d0fcecf9c8b32e5bbc7
CPU threads: 2; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded

I guess it could be optimised, but at least it does not crash or take an outrageous amount of time anymore.
Comment 7 Commit Notification 2022-03-07 09:41:07 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6810aa937caca167a6dc1aa0ac63d5995a143b10

faster bulk insert into o3tl::sorted_vector (tdf#117366)

It will be available in 7.4.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 8 Commit Notification 2022-03-07 09:41:16 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6adabd915d931b845fcf2fef15fbf3fca14ec9b3

faster check whether attributes have changed (tdf#117366)

It will be available in 7.4.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 9 Buovjaga 2022-03-07 10:25:35 UTC
Cutting finishes in less than 7 secs. Thanks.

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 03552ba854243dd05de37f471dabeb5873f5e73c
CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded