Bug 144373 - Writer not responsive for a while after opening 293 pages ODT with 3 big and terrible tables
Summary: Writer not responsive for a while after opening 293 pages ODT with 3 big and ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2021-09-08 10:02 UTC by elias estatistics
Modified: 2023-09-04 17:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The file by link from description (1.98 MB, application/vnd.oasis.opendocument.text)
2021-09-08 17:41 UTC, Roman Kuznetsov
Details
perf flamegraph (405.67 KB, application/x-bzip)
2021-09-08 18:33 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description elias estatistics 2021-09-08 10:02:01 UTC
Newly created Libre Writer file could not be opened 

1) I saved from PSPPire (stat progam) a factor analysis - dont worry sensitive info is deleted. 
-Note that I do many factor analysis, and writer opened ALL these documents without any problem.

2) This particular file is refused to be opened (it is halted) by libre writer 
- I do not know why 
- weird characters dont play a role - in that place existed text that i deleted 
- even with text could not be opened (halted).


Due to the size of attachment, please download from here:
Available ~1 Month. 
Elsewhere to upload it?

https://ufile.io/3mlqtj7f

Note: Either experimental features on or off, nothing changed, same behaviour.
Comment 1 elias estatistics 2021-09-08 10:16:39 UTC
Note: (is it a bug?) 

The smae file in Calc requires 122.4kb while in Writer 2.0MB!!!!
Comment 2 Mike Kaganski 2021-09-08 10:49:28 UTC
It doesn't "halt"; it opens OK, and then it "freezes" for quite a significant time, before it finally gets normally responsive - after it had layed out the three tables in the middle, each having 50+ columns, 100+ rows, and the first row in each having a *long* text in the last column. Given the size of the page (A4), the size of the text (12 pt), and the number of columns, thie indeed makes the first row *quite tall* (almost the whole page area). Add here the fact that the three tables *repeat the first row* at every page, and you get the tables spanning hundreds of pages, where each page has the "header" taking almost all the page, and a single "data row".

I don't know if it's possible to do something reasonable with such a corner case. However, if a performance improvement could be done - it would be definitely nice.
Comment 3 Roman Kuznetsov 2021-09-08 17:41:51 UTC
Created attachment 174896 [details]
The file by link from description
Comment 4 Roman Kuznetsov 2021-09-08 17:56:05 UTC
So, I opened the file in

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

1. LO opens file so fast
2. LO took 100% of one CPU core during around 1 minute and I had delays while tried scroll the document
3. Afer 1 minute I could scroll it fast and smooth but still had 100% loading of one CPU core

I see different number of pages in 7.2 (314) and in 7.3 (294) and I don't know where is more correct

Julien, could you please create a flamegraph for first minute after opening the file? May be Noel (or someone) will do else one miracle =)
Comment 5 Julien Nabet 2021-09-08 18:33:02 UTC
Created attachment 174897 [details]
perf flamegraph

Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today + gen rendering.
I waited for 1 or 2 minutes from the moment I start opening the file (I had previously opened Writer).
Comment 6 Sophie Sipasseuth 2023-09-04 13:24:45 UTC
No repro, when I had to wait, it was just a few seconds.

Version: 7.1.0.0.alpha1+ (x64)
Build ID: 738bcf5e9a8c443d60c29c3a8068e8c16c72638a
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: en-US
Calc: threaded

Version: 7.3.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 229123ccc6f90ebf66b3e659bebbd53f8a9bdd3a
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: en-US
Calc: threaded

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: df3b95a39472e18ea8acdaae447b7176e37a9256
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded

But, I also see a big difference in the number of pages.
Version 7.1.0 - 210 pages
Version 7.3.0 - 314 pages
Version 24.2.0 - 219 pages
Comment 7 Julien Nabet 2023-09-04 17:19:21 UTC
With master sources updated today or with LO Debian package 7.5.5 with gen rendering (to avoid accessibility part), it's still very slow for me when scrolling and still 100% CPU.