Bug 117636 - Multi-page block of Chinese glyphs slows down file opening and navigation
Summary: Multi-page block of Chinese glyphs slows down file opening and navigation
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks: CJK DOC Performance
  Show dependency treegraph
 
Reported: 2018-05-16 07:58 UTC by zyl
Modified: 2025-07-10 03:56 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
the result of command (60.82 KB, image/png)
2018-09-05 01:30 UTC, zyl
Details
the test doc (1.04 MB, application/msword)
2018-09-05 01:31 UTC, zyl
Details
Callgrind output from master (6.44 MB, application/x-xz)
2018-09-23 06:54 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zyl 2018-05-16 07:58:33 UTC
Description:
CPU 100% when I convert office document to pdf, using this command: /usr/bin/libreoffice  --invisible --convert-to pdf  xxx.docx. I test many files;

Steps to Reproduce:
1.open ubuntu terminate
2.input this command : /usr/bin/libreoffice  --invisible --convert-to pdf  xxx.docx
3.excuate and look at the cpu usage

Actual Results:  
the cpu usage is normal

Expected Results:
the cpu 100%


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
Comment 1 Jean-Baptiste Faure 2018-05-16 08:57:32 UTC
What is the problem? CPU is made to be used, no?
Did you mean that the PDF export take too long time?

Status set to NEEDINFO, please set it back to UNCONFIRMED once requested
informations are provided.

Best regards. JBF
Comment 2 Timur 2018-05-16 09:19:37 UTC
Please also test with master when reporting bugs: https://dev-builds.libreoffice.org/daily/master/.
Please compare some older LO which worked fine, current 6.0.4 and master.
Comment 3 zyl 2018-05-16 09:34:36 UTC
(In reply to Jean-Baptiste Faure from comment #1)
> What is the problem? CPU is made to be used, no?
> Did you mean that the PDF export take too long time?
> 
> Status set to NEEDINFO, please set it back to UNCONFIRMED once requested
> informations are provided.
> 
> Best regards. JBF

1.the cpu usage is 100+% when I convert office document to pdf;
2.the PDF export take too long time.
Comment 4 zyl 2018-05-16 09:58:39 UTC
(In reply to Timur from comment #2)
> Please also test with master when reporting bugs:
> https://dev-builds.libreoffice.org/daily/master/.
> Please compare some older LO which worked fine, current 6.0.4 and master.

I have installed and tested version 4.2.0 ~ 5.4.6 ~ 6.0.4. All have the problem;
Comment 5 Buovjaga 2018-06-15 13:05:00 UTC
Tested with docx, no problem here.

Please attach an example document.
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 6 zyl 2018-09-04 03:36:59 UTC
(In reply to Buovjaga from comment #5)
> Tested with docx, no problem here.
> 
> Please attach an example document.
> Set to NEEDINFO.
> Change back to UNCONFIRMED after you have provided the document.


Steps to Reproduce:
1.open ubuntu terminate
2.input this command : /usr/bin/libreoffice  --invisible --convert-to pdf  xxx.docx
3.excuate and look at the cpu usage

This will happen on any large file.
Comment 7 Buovjaga 2018-09-04 10:29:28 UTC
(In reply to zyl from comment #6)
> This will happen on any large file.

OK, but as you have the files, please attach an example one. I already tried with a file and did not see the problem after all.
Comment 8 zyl 2018-09-05 01:30:38 UTC
Created attachment 144683 [details]
the result of command
Comment 9 zyl 2018-09-05 01:31:45 UTC
Created attachment 144684 [details]
the test doc
Comment 10 Xisco Faulí 2018-09-05 11:01:41 UTC
Actually the file hangs at import time

Version: 6.2.0.0.alpha0+
Build ID: bf8fbbaa683ef7eef5f9587b60486f622b50cb80
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded
Comment 11 Buovjaga 2018-09-05 11:05:33 UTC
Re: previous comment: the file does not hang upon opening, it is just slow.

(In reply to zyl from comment #9)
> Created attachment 144684 [details]
> the test doc

Thanks. The file is very slow to open in GUI as well. The reason is the massive amount of Chinese glyphs (continuous) starting at page 63. If I remove all of those last pages, it is very quick.

Saving the original .doc to .odt seems to make the opening a bit quicker, but the perf is still horrible when scrolling to the last pages.

Version 3.3.0 says error it is not a doc.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 3c86ffd8ded628e6f2b4187948a1b1056f6a0f56
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on September 5th 2018

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 12 Buovjaga 2018-09-23 06:54:09 UTC
Created attachment 145125 [details]
Callgrind output from master

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 0ffa7a733d834647dfd59b864c52a015028822b6
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on September 21st 2018
Comment 13 QA Administrators 2019-09-24 03:09:41 UTC Comment hidden (obsolete)
Comment 14 mattia.b89 2019-09-28 13:50:17 UTC
I CONFIRM the issue:
it's impossible to open the .doc because LO hangs at importing it


Version: 6.3.1.2
Build ID: 6.3.1-1
CPU threads: 4; OS: Linux 5.2; UI render: default; VCL: gtk3; 
Locale: it-IT (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded
Comment 15 QA Administrators 2021-09-28 05:16:41 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2024-12-29 03:13:25 UTC Comment hidden (obsolete)
Comment 17 Jonathan Clark 2025-07-10 03:56:07 UTC
The fix for bug 64991 improved the situation significantly, both when scrolling through most of the document, and in PDF export:

Original:
real	1m12.863s
user	1m10.654s
sys	0m0.201s

With fix:
real	0m39.827s
user	0m37.679s
sys	0m0.165s

Performance is still abysmal when viewing the microscopic print at the end of the document. I tried to reproduce the issue by hand in the same document, but I couldn't. A simple cut+paste with the same formatting is enough to prevent it. This suggests we're setting up some sort of pathological behavior in the DOC import code.

As with bug 64991, it's possible that the root cause won't be detectable via profiling.