Bug 43544

Summary: FILEOPEN: Calc extremely slow when opening some XLSX files
Product: LibreOffice Reporter: synerg.is.tic.folk.sonomy+lo
Component: SpreadsheetAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: garyvdm, lgodard.libre, runar
Version: 3.4.4 release   
Hardware: Other   
OS: All   
Whiteboard: BSA
i915 platform: i915 features:
Attachments: The 2012 budget book linked here: http://www.kent.edu/budgetoffice/index.cfm (probably generated by Excel 201?)

Description synerg.is.tic.folk.sonomy+lo 2011-12-06 02:28:55 UTC
Created attachment 54142 [details]
The 2012 budget book linked here: http://www.kent.edu/budgetoffice/index.cfm (probably generated by Excel 201?)

Problem description: What the title says.

Steps to reproduce:
1. Open attached file
2. Wait
3. ???
4. Profit!

Current behavior: Libreoffice stalls after drawing a blank gray window and it consume all of one core's cycles. Memory usage is nominal and stable. (82.5MB in my case)
An essentially useless strace shows that it continues to poll for mouse movement.

Expected behavior: File should open and display. All memory and cores should be consumed. 

Platform: Archlinux x64
libreoffice-calc: 3.4.4-3
Comment 1 synerg.is.tic.folk.sonomy+lo 2011-12-06 02:36:19 UTC
Actually, after liboffice runsa at full-tilt for a few minutes (5?), the CPU usage drops to 0. RAM usage is still the same.
I'm not sure what's happening at that point, since I didn't throw an strace on it.
Comment 2 Laurent Godard 2011-12-06 02:42:39 UTC
seems very slow on looping on properties
here is a backtrace

(gdb) bt
#0  0xac9d57b4 in ScAttrArray::FindStyleSheet (this=0x9096110, pStyleSheet=0xa8c68a88, rUsedRows=..., bReset=false)
    at /home/lgodard/projets/libreoffice/build/git/master/libo/sc/source/core/data/attarray.cxx:1723
#1  0xaca07348 in ScColumn::FindStyleSheet (this=0x908b518, pStyleSheet=0xa8c68a88, rUsedRows=..., bReset=false) at /home/lgodard/projets/libreoffice/build/git/master/libo/sc/source/core/data/column.cxx:631
#2  0xacb7fe4a in ScTable::StyleSheetChanged (this=0x9085b90, pStyleSheet=0xa8c68a88, bRemoved=false, pDev=0xbfffbad0, nPPTX=0.067000000000000004, nPPTY=0.067000000000000004, rZoomX=1/1, rZoomY=1/1)
    at /home/lgodard/projets/libreoffice/build/git/master/libo/sc/source/core/data/table2.cxx:2037
#3  0xaca8413c in ScDocument::StyleSheetChanged (this=0x8d64740, pStyleSheet=0xa8c68a88, bRemoved=false, pDev=0xbfffbad0, nPPTX=0.067000000000000004, nPPTY=0.067000000000000004, rZoomX=1/1, rZoomY=1/1)
    at /home/lgodard/projets/libreoffice/build/git/master/libo/sc/source/core/data/document.cxx:4492
#4  0xad1643d7 in ScStyleObj::SetOnePropertyValue (this=0xa8d68ecc, rPropertyName="WritingMode", pEntry=0x8c4c4f0, pValue=0xabaed438)
    at /home/lgodard/projets/libreoffice/build/git/master/libo/sc/source/ui/unoobj/styleuno.cxx:1943
#5  0xad162973 in ScStyleObj::setPropertyValues (this=0xa8d68ecc, aPropertyNames=uno::Sequence of length 39 = {...}, aValues=uno::Sequence of length 39 = {...})
    at /home/lgodard/projets/libreoffice/build/git/master/libo/sc/source/ui/unoobj/styleuno.cxx:1519
#6  0xac061d82 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#7  0xac061eff in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#8  0xac12ef5c in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#9  0xac12efbd in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#10 0xac12eade in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#11 0xac12f684 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#12 0xac12fb80 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#13 0xac1339ee in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#14 0xabdd9438 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#15 0xabd2b115 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/fastsax.uno.so
#16 0xabdd08e7 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#17 0xabdd09ad in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#18 0xabdde416 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) ()
   from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#19 0xac1410d7 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#20 0xac13e7a2 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#21 0xabdd9438 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#22 0xabd2b115 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/fastsax.uno.so
#23 0xabdd08e7 in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#24 0xabdd09ad in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#25 0xabdde416 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) ()
   from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#26 0xac0dfbba in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#27 0xabdd404a in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
   from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#28 0xac0dfcac in ?? () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/../program/libooxlo.so
#29 0xb796d0c8 in SfxObjectShell::ImportFrom(SfxMedium&, bool) () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/libsfxlo.so
#30 0xb797436c in SfxObjectShell::DoLoad(SfxMedium*) () from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/libsfxlo.so
#31 0xb799625c in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
   from /home/lgodard/projets/libreoffice/build/git/master/libo/solver/unxlngi6.pro/installation/opt/program/libsfxlo.so
Comment 3 Laurent Godard 2011-12-06 03:11:05 UTC
with profiling help, the offending area

http://opengrok.libreoffice.org/xref/core/sc/source/ui/unoobj/styleuno.cxx#1943
Comment 4 Laurent Godard 2011-12-07 02:43:18 UTC
in the file xl/styles.xml is 4.7 Mb

a lot of styles defined
<numFmts count="7"></numFmts><fonts count="95"></fonts><fills count="58"></fills><borders count="25"></borders><cellStyleXfs count="38064"></cellStyleXfs><cellXfs count="248"></cellXfs><cellStyles count="38064"></cellStyles>
Comment 5 tester8 2012-01-12 06:32:39 UTC
Reproduced with

LOdev 3.5.0beta2 
4ca392c-760cc4d-f39cf3d-1b2857e-60db978
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI

Switch to NEW.
Comment 6 ringe 2013-03-08 19:25:22 UTC
Any reason this is not a duplicate of bug 30770 ?
Comment 7 foss 2014-06-30 08:41:03 UTC
Just FYI: this presists with

LO4.3RC1, OS X 10.9.3
LO4.4a0+, win 8.1
Comment 8 foss 2014-06-30 08:41:50 UTC
Forgot: Excel 2011 on OS X opens this rather fast.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.