Bug 134864 - Calc takes a time for XLSX file opening (so many condition formatting rules in the file)
Summary: Calc takes a time for XLSX file opening (so many condition formatting rules i...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 inReleaseNotes:25.8
Keywords: filter:xlsx, perf
Depends on:
Blocks: XLSX-Conditional-Formatting Performance
  Show dependency treegraph
 
Reported: 2020-07-16 13:02 UTC by v2
Modified: 2025-03-04 11:49 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example XLSX file that freezes LibreOffice in Tabbed UI (1.38 MB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-07-16 13:08 UTC, v2
Details

Note You need to log in before you can comment on or make changes to this bug.
Description v2 2020-07-16 13:02:35 UTC
Description:
Using Tabbed User Interface some larger (over 1MB) XLSX sheets do not load instead LibreOffice freezes.  The files do open when using the Standard Toolbar UI.

Also, switching to a tabbed interface (from Standard Toolbar UI) when having the same XLSX file open freezes LibreOffice.

FILEOPEN, UI

Steps to Reproduce:
1. Switch To "Tabbed" User Interface
2. Double Click on large XLSX file
3. LibreOffice takes a while to load the file and eventually freezes


Actual Results:
Total LibreOffice Freeze

Expected Results:
File opens in due time


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.4.5.2 (x64)
Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 1 v2 2020-07-16 13:08:22 UTC
Created attachment 163114 [details]
Example XLSX file that freezes LibreOffice in Tabbed UI

I removed some information out of the file but metadata could be present please keep any data confidential as much as possible
Comment 2 m_a_riosv 2020-07-16 18:04:57 UTC
Repro tabbed UI with:
Versión: 6.4.6.0.0+ (x64)
Id. de compilación: 33d23bfd409783e5ba7279a7ef40f970e629e518
Subprocs. CPU: 4; SO: Windows 10.0 Build 19608; Repres. IU: GL; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded

Alos hangs with standar UI with:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: d851a02df57ab378ed0cc6d9362516de09c3279c
CPU threads: 4; OS: Windows 10.0 Build 19608; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: threaded
Comment 3 v2 2020-08-14 20:06:10 UTC
Also hangs with with any User interface -

Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 4 NISZ LibreOffice Team 2020-10-06 11:19:34 UTC
This file seems to have an insane amount of conditional formatting set in Excel.
Comment 5 v2 2020-10-26 14:15:55 UTC
It may have excessive conditional formatting but why does 6.4.5.2 open it as long as it has the standard button user interface enabled and freezes on the tabbed user interface?

The newer versions of LibreOffice just freeze on any user interface.

The contents of the file should not matter ... If it opens in Excel it should open in LibreOffice.  In fact, LibreOffice should work better and do its best to open even files that cannot be opened in Excel for some reason (which has been my experience quite a few times).  Also, I do not think it should freeze for any reason, if at all possible.  Crash yes but not freeze.  Freezing is much more frustrating to users as it looks like the program is still working and they waste even more time waiting for something to happen.
Comment 6 QA Administrators 2023-02-20 03:19:28 UTC Comment hidden (obsolete)
Comment 7 Roman Kuznetsov 2023-04-12 19:02:19 UTC
No freeze, but LO took around 20 sec to open the file

I don't think Tabbed UI is matter here

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 185cf4496d8750c9e4905c4e384252b01b85d130
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded
Comment 8 Tex2002ans 2024-03-17 01:40:58 UTC
I didn't have any hangs, but it did take a while to open.

Time it took me to open comment 1's attachment in:

LO 24.2.1:

- 74 seconds

Excel 365 (Version 2402, Build 17328.20162):

- 10 seconds

- - -

This was the exact Help > About info:

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 9 m_a_riosv 2024-03-17 23:46:45 UTC
Opening the file with Excel is fast.

But selecting in Excel
 Conditional Formatting
 Conditional Formatting Rule Manager
and trying to select e.g. sheet W2 causes Excel to hang.
Microsoft® Excel® para Microsoft 365 MSO (versión 2402 compilación 16.0.17328.20124) de 64 bits

So it seems that something is wrong with the file.
Maybe too much CF
Comment 10 Buovjaga 2024-12-04 15:41:13 UTC
50 secs for me.

Arch Linux 64-bit
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d775d637b9ff7619aba195559deed6e9a341e372
CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 4 December 2024
Comment 11 Commit Notification 2025-02-28 12:17:23 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#134864 speedup load of pathological conditional formats in XLS

It will be available in 25.8.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 12 Buovjaga 2025-02-28 15:42:37 UTC
With `time OOO_EXIT_POST_STARTUP=1` I get

real    0m6,876s
user    0m5,956s
sys     0m0,585s

so it's a huge improvement.

Arch Linux 64-bit
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c46213606d64bbaca9b1d284063c248932c725de
CPU threads: 8; OS: Linux 6.13; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 28 February 2025