Bug 158595 - Performance : PDF export is taking 1min 20 sec
Summary: Performance : PDF export is taking 1min 20 sec
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2023-12-08 11:22 UTC by SATYA SRINIVAS K
Modified: 2023-12-12 06:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
AA1234 - Chart of Stuff_Samp_1-2023-09-07 21_51_41.docx (205.37 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-12-08 11:23 UTC, SATYA SRINIVAS K
Details
CulpritCommit (18.29 MB, video/mp4)
2023-12-12 04:02 UTC, Steven Casey
Details
FixedCommit (16.73 MB, video/mp4)
2023-12-12 04:04 UTC, Steven Casey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SATYA SRINIVAS K 2023-12-08 11:22:05 UTC
Description:
Export to pdf is taking 1 min 20 sec.

Steps to Reproduce:
1.Convert the atteched "AA1234 - Chart of Stuff_Samp_1-2023-09-07 21_51_41.docx" file to pdf with --convert-to command line.

Actual Results:
Export to PDF is taking 1 min 20 sec

Expected Results:
Export to PDF should take less time (1 min 20 sec is not acceptable).


Reproducible: Always


User Profile Reset: No

Additional Info:
NA
Comment 1 SATYA SRINIVAS K 2023-12-08 11:22:56 UTC
I tested by opening this file in Libre office desktop application(7.6.3.2) and it is taking ~3 Sec to load the first page and It is smooth even If I scroll through all the pages (not taking more time on any of the pages to load).
Comment 2 SATYA SRINIVAS K 2023-12-08 11:23:24 UTC
Created attachment 191311 [details]
AA1234 - Chart of Stuff_Samp_1-2023-09-07 21_51_41.docx
Comment 3 m_a_riosv 2023-12-08 23:45:17 UTC
No reproducible opening with LibreOffice and exporting to pdf.
Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0ddd9f7e055a0c1ecb120de3e40c3fdb8373e9dc
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 4 SATYA SRINIVAS K 2023-12-11 07:22:54 UTC
Confirmed that it is not reproducible in Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community.
I don't know whether it is a regression or not as I don't know any old working version but I think, it is still worth if someone do a bibisect and findout the possible changeset which causes this issue get's fixed., we can port back if that is a fairly simple and safe fix. As it is a performance issue, I feel, it is worth porting back the fix if possible.
Comment 5 m_a_riosv 2023-12-11 12:23:42 UTC
Still with
Version: 7.6.5.0.0+ (X86_64) / LibreOffice Community
Build ID: 9e82062325cc00d2c2974d02d6759015bffdde03
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 6 Steven Casey 2023-12-12 03:54:00 UTC
Takes about 20 seconds for me in:

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Practically instant on:

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0ddd9f7e055a0c1ecb120de3e40c3fdb8373e9dc
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

I decided to bibisect the Win64-24.2 repo to see which commit fixed the slow exporting. I believe it will be:

https://git.libreoffice.org/core/+/16aa870598d00eb3e6ac15435fef080d3b87cbc1

This also makes sense, directly from the commit:
"tdf#156306 sw: PDF export: duplicate structure element from ..."

I also tried to figure out when this bug was introduced. I bibisected Win64-7.2 repo and found this commit to be the culprit:
https://git.libreoffice.org/core/+/cd60a2d31737f491088cfb0789bc014b1e0aad5f

Considering this seems to have a fix already in the 24.2 repo, I am not sure exactly what info to change in this report without accidently inconveniencing someone else. I will reach out for guidance and come back to change whatever is needed. In the meantime, I will change the version, set the status to NEW, add some keywords, and add a few "see also" links.

I also propose raising the importance to High-Major

Shortly, I will also add videos showing my findings.
Comment 7 Steven Casey 2023-12-12 04:02:44 UTC
Created attachment 191372 [details]
CulpritCommit

This video shows the commit that caused the issue in 7.2 and beyond
Comment 8 Steven Casey 2023-12-12 04:04:27 UTC
Created attachment 191373 [details]
FixedCommit

This video shows the commit from 24.2 which fixes the culprit commit.
Comment 9 Buovjaga 2023-12-12 06:00:47 UTC
Thanks, Steven! While the fix candidate sounds very plausible, there is a mystery: 16aa870598d00eb3e6ac15435fef080d3b87cbc1 has been backported to 7.6 and should have already been in 7.6.0. Even the additional commits toward the bug were backported to 7.6.3. Possibly there is some earlier change affecting this in 24.2 which has not been backported.

I would still call it fixed as everybody here confirmed it. I can mention this in the chat.