Bug 120351 - Writer hangs for over 20 minutes loading a 3MB, 450-page DOCX Edit with thousands of endnotes
Summary: Writer hangs for over 20 minutes loading a 3MB, 450-page DOCX Edit with thous...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.6.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0
Keywords: filter:docx, perf
: 137938 139211 (view as bug list)
Depends on:
Blocks: DOCX-Opening CPU-AT-100%
  Show dependency treegraph
 
Reported: 2018-10-05 18:47 UTC by Asaf Bartov
Modified: 2021-04-07 19:30 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
the docx that hangs Writer on opening. (3.51 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-10-05 18:49 UTC, Asaf Bartov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Asaf Bartov 2018-10-05 18:47:43 UTC
Description:
Trying to load the attached DOCX results in a hang. I force-quit after 20 minutes. The DOCX was created in MS Word (2013 I think), and is about 450 pages, thousands of footnotes, but no graphics AFAIK.

I am using the latest package provided by snap. LibreOffice 6.1.2.1. Ubuntu 18.04.

Olivier Tilloy from Canonical confirmed the bug and added:

"I can observe the issue in an up-to-date bionic amd64 VM. Opening the attached document and rendering it completely took 32 minutes. This is an insane amount of time to load a 516 pages document (153316 words, 927209 characters), but it eventually completed and once done the document can be navigated and edited just fine, as far as I can tell."

"Note that I also tested libreoffice 6.0.6 that's installed by default in Ubuntu 18.04 (the deb packages, not the snap), and it took over 20 minutes to load the same document, so it's not a snap-specific problem."

Steps to Reproduce:
1. Open the attached DOCX file.
2. Observe time passing.
3. Observe more time passing. :)

Actual Results:
as described above, it took literally half an hour of 100% CPU effort to open.

Expected Results:
I expect it to open in under 30 seconds.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.2.1
Build ID: libreoffice-6.1.2.1-snap1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group threaded
Comment 1 Asaf Bartov 2018-10-05 18:49:02 UTC
Created attachment 145419 [details]
the docx that hangs Writer on opening.
Comment 3 MM 2018-10-05 19:22:05 UTC
Confirmed on windows 7 x64 with Version: 6.0.6.2 (x64)
Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77
CPU threads: 3; OS: Windows 6.1; UI render: default

and 

ubuntu 16.04 x64 with Version: 6.2.0.0.alpha0+
Build ID: ad6adb1bfadf49af3187a0bb3ceffbf355e9eed1
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-09-29_02:45:20
Locale: en-US (en_US.UTF-8); Calc: threaded

and

Version: 5.1.6.2
Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: single
Comment 4 Timur 2018-11-19 09:09:53 UTC
Cold be a duplicate of Bug 76260. Please compare console errors.
Comment 5 Commit Notification 2021-02-18 12:32:20 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7dd8f8aace536a8e60e87e61ee1d90d61fba15eb

tdf#120351 DOCX import: fix slow endnote import

It will be available in 7.2.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 6 Xisco Faulí 2021-02-19 16:17:42 UTC
After the fix it takes

real	0m16,431s
user	0m15,568s
sys	0m0,683s

to open the attached document, before it, I takes

real	6m53,672s
user	6m51,205s
sys	0m2,290s


wow, super nice improvement.

@László Németh, thanks for fixing this issue!!
Comment 7 Xisco Faulí 2021-02-19 16:24:11 UTC
*** Bug 139211 has been marked as a duplicate of this bug. ***
Comment 8 Xisco Faulí 2021-02-19 19:16:45 UTC
*** Bug 137938 has been marked as a duplicate of this bug. ***
Comment 9 László Németh 2021-03-02 18:46:49 UTC
@Xisco: According to your data, loading the test document is not only 25 times faster, but we finally have a reasonable load time. :) Many thanks for verifying and closing the duplicates!