Bug 61484

Summary: FILEOPEN: Very slow open XLS with complex table structure and conditional formatting
Product: LibreOffice Reporter: user <user1234>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: minor CC: aron.budea, ilmari.lauhakangas, markus.mohrhard, timur, xiscofauli, yuki.bot
Priority: medium Keywords: filter:xlsx, haveBacktrace, perf
Version: Inherited From OOo   
Hardware: Other   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=51785
https://bugs.documentfoundation.org/show_bug.cgi?id=115488
https://bugs.documentfoundation.org/show_bug.cgi?id=81765
Whiteboard: BSA target:4.1.0 Confirmed:4.3.0.0.alpha0+:OSX Confirmed:4.1.3.2:OSX
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 113782    
Attachments: file.xls in archive
Debug with Procdump+WinDBG in LO 5.2+
Callgrind output from master

Description user 2013-02-26 06:42:09 UTC
Created attachment 75552 [details]
file.xls in archive

Problem description: 
Spreadsheet can't open file with complex table structure.
File opened normaly in MS Excel and Gnumeric

Steps to reproduce:
1. try open file

Current behavior:
program hangs

Expected behavior:
file open
              
Operating System: All
Version: 4.0.0.3 release
Comment 1 user 2013-02-26 07:35:08 UTC
*** Bug 61488 has been marked as a duplicate of this bug. ***
Comment 2 Yifan Jiang 2013-02-26 08:37:00 UTC
It is easily reproduced. And actually the problem happens on 3.6 build as well.
Comment 3 Yifan Jiang 2013-02-26 08:42:55 UTC
Hi Markus,

It looks finally crash after a long hang here. Would you mind to have a look if time available? Thanks in advance :)
Comment 4 Markus Mohrhard 2013-02-26 09:14:41 UTC
(In reply to comment #3)
> Hi Markus,
> 
> It looks finally crash after a long hang here. Would you mind to have a look
> if time available? Thanks in advance :)

Ok, So the first look (while it is still loading) shows that the file contains a large number of conditional formats. Applying them to the calc model seems to be the problem but the time is really spend in handling SfxItemSet and SfxPoolItems and not in the conditional format code itself.

I'll check with Excel and see if there is a better way how we can handle this file.
Comment 5 Not Assigned 2013-02-26 21:44:31 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=732d560a2e679a05ceffa6670536877fb32d9f52

small performance improvement for fdo#61484



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 retired 2013-12-08 11:27:24 UTC
Reproduced with 4.3alpha0+ and 4.1.3.2 on OS X 10.9.

4.1.3.2 gives error that the file is locked on another system. Offering Open, Open write protected, cancel. First two choices lead to a hang.
Comment 7 retired 2013-12-08 11:28:00 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2015-04-19 03:21:30 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2015-06-16 10:33:53 UTC
Still hangs.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 80ec99db4325a439a8a3f1d420d0a80f8bf9c439
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-16_00:00:20
Locale: fi-FI (fi_FI)
Comment 10 Timur 2016-04-04 11:21:29 UTC Comment hidden (obsolete)
Comment 11 Timur 2016-04-04 11:22:11 UTC
Created attachment 124066 [details]
Debug with Procdump+WinDBG in LO 5.2+

svllo.dll SfxSetItem
Comment 12 QA Administrators 2017-11-30 06:26:19 UTC Comment hidden (obsolete)
Comment 13 Timur 2017-11-30 07:52:28 UTC
It's not "can't open2 but rather "very slow to open". 
My comp:
LO 6.0+  400 sec for XLS
LO 6.0+  300 sec for XLSX
MSO 2013  60 sec for XLS (Excel also opens it slowly)
Comment 14 Buovjaga 2017-12-09 22:21:23 UTC
Created attachment 138335 [details]
Callgrind output from master

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: d4a54ec92674773bc0f9358a3d9090915a3c8fb0
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on December 9th 2017
Comment 15 Xisco FaulĂ­ 2019-04-22 13:13:25 UTC
it takes 

real	0m17,313s
user	0m16,895s
sys	0m0,233s

in

Version: 6.3.0.0.alpha0+
Build ID: e913727c7ee3af0bb4031c6829abfb3373306492
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

most likely a dupe of bug 81765

*** This bug has been marked as a duplicate of bug 81765 ***