Bug 1222533 - Libreoffice needs 100% CPU for 3 minutes to open Lenovo compatibility matrix
Summary: Libreoffice needs 100% CPU for 3 minutes to open Lenovo compatibility matrix
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: LibreOffice (show other bugs)
Version: Current
Hardware: x86-64 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Martin Schreiner
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-09 10:32 UTC by Martin Wilck
Modified: 2024-07-17 16:21 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
martin.schreiner: needinfo? (martin.wilck)


Attachments
perf record data for loading the file with native TW package (3.01 MB, application/x-xz)
2024-04-09 10:32 UTC, Martin Wilck
Details
perf data for opening the file with flatpak soffice (678.37 KB, application/x-xz)
2024-04-09 10:34 UTC, Martin Wilck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Wilck 2024-04-09 10:32:42 UTC
Created attachment 874156 [details]
perf record data for loading the file with native TW package

Upstream: https://bugs.documentfoundation.org/show_bug.cgi?id=160595

Environment: OpenSUSE Tumbleweed 20240329, GNOME/X11, libreoffice-calc-24.2.2.2-1.2.x86_64

Offending file: 

Lenovo Accessories and Options Compatibility Matrix (OCM)
https://download.lenovo.com/pccbbs/options_iso/ocm_apr_2024.xlsx
(access via http://www.lenovo.com/accessoriesguide)

Steps to reproduce: Download and open the file with calc.

Results: Calc hangs with 100% CPU with "load document" progress bar at ~80%.
It finishes after ~3 minutes.

With the flatpak version of Libreoffice, opening the file takes only ~15s.

"perf report" shows for the openSUSE native package:

Samples: 520K of event 'cycles:P', Event count (approx.): 366840243651                                                                 
Overhead  Command          Shared Object                   Symbol                                                                      
  49.69%  soffice.bin      libgtk-3.so.0.2409.32           [.] 0x000000000030d7a8                                                      
  27.60%  soffice.bin      libglib-2.0.so.0.8000.0         [.] g_node_insert_before                                                    
   2.49%  soffice.bin      libgtk-3.so.0.2409.32           [.] 0x000000000030d7ac                                                      
   1.32%  soffice.bin      libgtk-3.so.0.2409.32           [.] 0x000000000030d7af                                                      
   0.85%  soffice.bin      libgtk-3.so.0.2409.32           [.] 0x000000000030d7b7                                                      
   0.43%  soffice.bin      libc.so.6                       [.] malloc                                                                  
   0.27%  soffice.bin      libuno_cppu.so.3                [.] typelib_typedescriptionreference_equals                                 
   0.23%  soffice.bin      libc.so.6                       [.] _int_free
Comment 1 Martin Wilck 2024-04-09 10:34:35 UTC
Created attachment 874157 [details]
perf data for opening the file with flatpak soffice

   1.92%  soffice.bin      libuno_cppu.so.3                [.] typelib_typedescriptionreference_equals                                 
   1.16%  soffice.bin      libgobject-2.0.so.0.7600.6      [.] g_type_check_instance_is_a                                              
   0.96%  soffice.bin      libuno_sal.so.3                 [.] rtl_uString_release                                                     
   0.79%  soffice.bin      libuno_cppu.so.3                [.] typelib_static_type_getByTypeClass                                      
   0.67%  soffice.bin      libuno_cppuhelpergcc3.so.3      [.] cppu::OWeakObject::release()                                            
   0.66%  soffice.bin      libuno_cppuhelpergcc3.so.3      [.] cppu::OWeakObject::acquire()                                            

None of the functions taking most CPU time in the native package show up here.
Comment 2 Danilo Spinella 2024-06-27 10:26:22 UTC
Assigning to LO maintainer.
Comment 3 Martin Schreiner 2024-07-17 14:19:57 UTC
Ok, I can't reproduce this bug as of the 24.2.5.2 release.

Using any of the supported VCLs, qt5, qt6 or gtk3 (the VCL reported here as being faulty), it loads the compatibility matrix very quickly.

This is the file I used, updated for July:
https://download.lenovo.com/pccbbs/options_iso/ocm_july_2024.xlsx
File size is 4.5MB.

Martin, can you re-check if you can reproduce this issue over there?
Comment 4 Martin Wilck 2024-07-17 16:21:01 UTC
(In reply to Martin Schreiner from comment #3)
> Ok, I can't reproduce this bug as of the 24.2.5.2 release.
> 
> Using any of the supported VCLs, qt5, qt6 or gtk3 (the VCL reported here as
> being faulty), it loads the compatibility matrix very quickly.
> 
> This is the file I used, updated for July:
> https://download.lenovo.com/pccbbs/options_iso/ocm_july_2024.xlsx
> File size is 4.5MB.
> 
> Martin, can you re-check if you can reproduce this issue over there?

Confirmed, my LO opened that file in ~15, like the flatpak mentioned in comment 0.
I also tried the file from April which is slightly bigger, it loaded in the same amount of time. 

So the issue appears to be fixed. Thanks.