libreoffice: long time delay for properties window when set UI language to zh_CN

Bug #1258368 reported by suokunlong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Invalid
High
libreoffice (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When zh_CN (Simplified Chinese) language is enabled for LibreOffice UI, the property windows will freeze and take much long time (more than 10 seconds) to show up.

This happens in my two home laptops and one office computer, all of which have Ubuntu 13.10 installed. It was the same when I was using Ubuntu 13.04.

This issue has been tested by someone else in an official LibreOffice QQ Qun in many other linux distributions and found no problems, so this is a Ubuntu specific bug, not a libreoffice bug.

Steps to reproduce:
1. Install LibreOffice with zh_CN lang pack ( no matter whether you install the LibreOffice offical builds, or by apt-get from ubuntu repo);
2. Start LibreOffice Calc to create a new spreadsheet. Make sure the UI language is Simplified Chinese. (If not, change the UI language in LibreOffice options menu);
3. In any cell, right click -> "单元格属性" (Format Cells).

Current behaviour:
The "format cells" window takes more than 10 seconds to show up.
(Actually, it's the same for other formatting properties window, i.e. chars, page, paragraphs, etc.)
Set LibreOffice UI language to English will solve the problem.

Expect behaviour:
The "format cells" window should show up instantly within 2 senconds, as it is for English UI.

System Info:
Ubuntu 13.10 x86. (Same for 13.04, as well as x86-64). Maybe OK before ubuntu 12.04.
Same issue no matter the system locale is zh_ch or en_US.

See Also:
I filed a bug in LibreOffice bug tracker earlier, but then found this is not their bug.
See: https://bugs.freedesktop.org/show_bug.cgi?id=70857

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Description:
LibreOffice takes much longer time for the formating window to show up. Tested both in Calc and Writer.

Steps to reproduce:
1. Install a libreoffice version without any lang pack.
2. Create a new spreadsheet, right-click-->"format cells". the formating window pops up instantly. (Or, create a new writer file, insert a table, right-click-->"table", or, in writer, right-click-->"Character", windows pop up instantly).
3. Install the zh_ch lang pack (so the default UI language become Simplified Chinese), and do the same test as show in step 2, the formating window takes around 10s to pop up.
4. "Tools(工具)-->Options(选项)-->Language Settings(语言选项)-->Language(语言)", set "Language of: User Interface(用户界面)" to "English(英语)", then restart LO and test step 2, window pops up instantly.

Current Behaviour:
Formating window takes much longer time to show up when zh_cn is enabled for UI.

OS: Ubuntu 13.10 x86, LibreOffice 4.1.3.2, sys locale: zh_cn.

In my memory, this behaviour first began since 4.0, and was reproduciable in Ubuntu 13.04. The same to use LO official build and Ubuntu build.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

This seems to affect all formating properties window, and when set UI language to EN everything is OK again.

This blocks my work when enable zh_cn UI language, so mark importance to HIGH CRITICAL.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Today I tested in Ubuntu 13.04 X64 and the same behaviour happen, so not a ubuntu 13.10 or an x86 only issue.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Still exists in 4.2 beta 2.

To be simple:
1. Install zh_CN lang pack;
2. Calc -> right click -> "单元格格式"

Formating properties window takes more than 10s to show.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Based on tests done by members in the official QQ Qun, I confirm that this issue is Ubuntu 13.04/13.10 specific, not reproducable in other linux distrs.

Revision history for this message
In , Michael-meeks-1 (michael-meeks-1) wrote :

If something is very slow, install the debuginfo so you have symbols (without this it's a waste of time) and do:

export OOO_DISABLE_RECOVERY=1
valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes ./soffice.bin --splash-pipe=0

reproduce the problem (if it only takes a second or two to pop up then do it a few times), then exit cleanly.

Bear in mind callgrind runs 150x slower than real-time - so this will take some patience.

Now bzip2 the callgrind.txt* and mail it to an interested developer.

Or poke in kcachegrind and fix it yourself =)

Needs a callgrind trace.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Sorry, I really don't know how to do the symbols info things, since I run ubuntu 13.10, and LO build of LibreOffice DEBs.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Valgrind trace generated, because it's a big file, please go to the following link: (Click the "下载" button to download)
http://www.kuaipan.cn/file/id_2595367132601438.htm

Below is the terminal output:
suokunlong@suokunlong-Vostro-230:~$ valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes /usr/lib/libreoffice/program/soffice.bin --splash-pipe=0
==5678== Callgrind, a call-graph generating cache profiler
==5678== Copyright (C) 2002-2012, and GNU GPL'd, by Josef Weidendorfer et al.
==5678== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==5678== Command: /usr/lib/libreoffice/program/soffice.bin --splash-pipe=0
==5678==
==5678== For interactive control, run 'callgrind_control -h'.
10%
20%
25%
30%
35%
40%
50%
60%
75%
100%
end
==5678==
==5678== Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw
==5678== Collected : 60770249569 17297929635 10729202474 27629464 47153782 3441863 544555 2622641 853884
==5678==
==5678== I refs: 60,770,249,569
==5678== I1 misses: 27,629,464
==5678== LLi misses: 544,555
==5678== I1 miss rate: 0.4%
==5678== LLi miss rate: 0.0%
==5678==
==5678== D refs: 28,027,132,109 (17,297,929,635 rd + 10,729,202,474 wr)
==5678== D1 misses: 50,595,645 ( 47,153,782 rd + 3,441,863 wr)
==5678== LLd misses: 3,476,525 ( 2,622,641 rd + 853,884 wr)
==5678== D1 miss rate: 0.1% ( 0.2% + 0.0% )
==5678== LLd miss rate: 0.0% ( 0.0% + 0.0% )
==5678==
==5678== LL refs: 78,225,109 ( 74,783,246 rd + 3,441,863 wr)
==5678== LL misses: 4,021,080 ( 3,167,196 rd + 853,884 wr)
==5678== LL miss rate: 0.0% ( 0.0% + 0.0% )

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

A copy of the trace file also uploaded to dropbox, in case someone can not download at kuaipan.cn

https://www.dropbox.com/s/m3gtddzxf7gm635/callgrind.out.5678.tar.bz2

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Changing the title because I tested with Tranditional Chinese, Japanese, Korean as well as English GB user interfaces, and found the same problem in all the non-English (CJK) UIs.

Changing status to NEW from NEEDINFO because I have provided the debuginfo.

Revision history for this message
In , Michael-stahl (michael-stahl) wrote :

since comment #4 says the bug happens on Ubuntu only, CC: Bjoern

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Today I tested in Ubuntu 14.04 lts, libreoffice 4.2.4.1 Build ID: d4c441391e20647b3d2e8dde4d20aa868e77e515, and also 4.2.3.3.

The delay no longer exists anymore. So marking as RESOLVED WORKSFORME.

Maybe the "delay" was because the uncomplete UI translation?
libreoffice 4.2 ZH_CN UI was 90% complete when this bug report was filed. Now it's 100% tranalated.

Revision history for this message
suokunlong (suokunlong) wrote :

Just tested and this bug do not exists in Ubuntu 14.04. Will test in 13.10 later to see if it still there.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Sorry to reopen, this issue happens again today,
Ubuntu 14.04 x86,
LibreOffice 4.3.0.1 and 4.2.5.2
Simplified Chinese UI (zh_CN)

Set back to UNCONFIRMED. (this bug never confirmed by someone else)

Revision history for this message
In , Yousuf 'Jay' Philips (philipz85) wrote :

Here's my testing on my desktop pc using the writer table right-click example.

System - Linux Mint 32-bit, Dual Core Intel Pentium 4 @ 3.20GHz, 4GB RAM.

- LibO 4.1 -

English : 1.0s
Arabic : 1.1s
Chinese (simplified) : 2.5s

- LibO 4.3 beta 2 -

English : 1.0s
Arabic : 1.2s
Chinese (simplified) : 3.5s

I'm assume the chinese characters take longer to render because of their complexity and i think the new dialog UI might also be a factor in the slowness.

Revision history for this message
In , Yousuf 'Jay' Philips (philipz85) wrote :

Created attachment 101516
how the UI looks with the droid font

Revision history for this message
In , Yousuf 'Jay' Philips (philipz85) wrote :

Created attachment 101517
how the UI looks with the WenQuanYi font

Revision history for this message
In , Yousuf 'Jay' Philips (philipz85) wrote :

Created attachment 101518
how the UI looks in Ubuntu 14.04

Revision history for this message
In , Yousuf 'Jay' Philips (philipz85) wrote :

After some unsuspected fooling around with chinese fonts and reporting a bug for the default use of libre fonts over proprietary fonts (bug 80346), i noticed that this problem boils down to fonts.

On my linux mint 13 (equivalent to ubuntu 12.04) installation, libreoffice defaults to using the droid font for the chinese interface, which is the package fonts-droid version 20101110+git-2. As can be seen in the previously attached screenshot, it doesnt render all the chinese characters, which i'm assuming is why the dialog takes so long to load. When i installed the ttf-wqy-zenhei package version 0.9.45, it took over rendering the text for the UI and all the chinese characters were there and the dialog opened in 1 second.

When i tried the default behaviour of the chinese UI in Ubuntu 14.04, there wasnt any problems as the droid font is updated in it.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Created attachment 103142
valgrind --tool=callgrind output

Sorry to reopen, but I encounter this issue again. It's quite annoying.
Open any of the formatting dialog takes 20+ seconds on my Ubuntu 14.04 x86 mechine.

Attached is the valgrind callgrind output.
I installed the ubuntu-build when generating these callgrind info.

Hope it will be helpful.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

(In reply to comment #18)
Sorry, seems that I run the wrong command. I should run
$ valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes /usr/li/libreoffice/program/soffice.bin --writer --splash-pipe=0

Regenerating...

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Created attachment 103159
callgrind_annotate output

This is the output for:
callgrind_annotate ./callgrind.out.10317 > ./callgrind_annotate.txt

The debug steps I followed:
1. Format -> Paragraph -> Cancle

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Created attachment 103160
valgrind terminal output

This is the terminal output when I run valgrind.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

As I have generated the callgrind_annotate file,
is the 6.3MB callgrind.out.10317.tar.bz2 file really needed? It's too large to attach.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Summary of this bug:

LibreOffice takes a long time to show up almost all of the following/properties dialog in Ubuntu, with zh-cn system locale and zh-cn LibreOffice UI.

The freeze also happens with Japanese and Korea UI in my system.
The freeze do not happen in Fedora. I do not believe its ubuntu's bug, because all other applications works fine in my system.

Steps to reproduce:
1. A fresh install of Ubuntu 14.04, Simplified Chinese locale.
2. Make sure you have Simplifed Chinese UI installed and enabled with libreoffice.
3. Try to open any of the following dialog:
 * In Calc: format cells; characters; format page...
 * In Writer: format paragraph; characters; format page; edit styles...

Current behaviour:
LibreOffice freezes for about 10-20 seconds at step 3 before open the dialog.

The bug behaviour did not happen in earlier vesions (3.6.7, 4.0.*), so it's a regression in version 4.1.*.

callgrind_annotate output in attachment 103159. valgrind terminal output in attachment 103160. (generated by doing "Format -> Paragraph -> Cancel" in Writer)

With this bug, one can do nothing with libreoffice in Ubuntu. The only workaround is to use english UI.
If more debug work is needed, i will provide.

Thanks!

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

(In reply to comment #23)
> Current behaviour:
> LibreOffice freezes for about 10-20 seconds at step 3 before open the dialog.

@Kevin: Thanks for the summary. Do you have the ttf-wqy-zenhei package installed as suggested by comment 17 and if so, which version?

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Created attachment 103845
"fc-list --zh" output

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Created attachment 103846
"dpkg-query --list font*" output

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Created attachment 103847
/etc/fonts/conf.d files list

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Created attachment 103848
/etc/fonts/conf.d/65-nonlatin.conf file

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

(In reply to comment #24)
> @Kevin: Thanks for the summary. Do you have the ttf-wqy-zenhei package installed as suggested by comment 17 and if so, which version?

Previously I have ttf-wqy-zenhei and ttf-wqy-microhei installed (this font was not updated for many years, so may be the same version). Previously I also tried other fonts (Microsoft Yahei, etc.), but the same behaviour (freezes)

But this time, I did a fresh install of Ubuntu 14.04 zh-CN UI, then installed the "missing language files" as suggested by update manager. I did not install wqy fonts this time. Still freezes.
Actually by installing the missing lanuage files, it installed: fonts-arphic-ukai and fonts-arphic-uming. Droid fonts (fallback) was installed by default with the fresh ubuntu install.

This freeze never happen in Fedora 20. I noticed that Fedora has different font conf files than Ubuntu.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :
Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Good new...I found something.

I did a "apt-get purge fonts-droid", and then uncheck the "Tools - Options - LibreOffice - View: Use system fonts for user interface", now no freeze anymore! But with this option checked, still freeze.

Intall fonts-droid again will cause freeze, no matter the "Use system fonts for user interface" is checked or not.

Lower importance to "Medium Major", as there is a workaround.

suokunlong (suokunlong)
Changed in libreoffice (Ubuntu):
status: New → Invalid
Revision history for this message
suokunlong (suokunlong) wrote :

This is caused by the droid fallback fonts. It seems that the chars covered by droid fallback fonts are not complete, so libreoffice is busy substituting thus caused the delay.

See my comments in https://bugs.freedesktop.org/show_bug.cgi?id=70857. Callgrind debug info in the bug report.

Changed in libreoffice (Ubuntu):
status: Invalid → New
Revision history for this message
suokunlong (suokunlong) wrote :

See also the discusion in the Ubuntu Chinese forum:
http://forum.ubuntu.org.cn/viewtopic.php?f=35&t=462131&p=3113351#p3113351

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

This is confirmed by a post in the Ubuntu Chinese forum:
http://forum.ubuntu.org.cn/viewtopic.php?f=35&t=462131&p=3113351#p3113351

So I set it to NEW.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :
Revision history for this message
In , Qubit (qubit) wrote :

Migrating Whiteboard tags to Keywords: (bibisectRequest)
[NinjaEdit]

Revision history for this message
In , Jmadero-dev (jmadero-dev) wrote :

@Kevin - it would be great if you could bibisect this considering it requires a pretty specific setup that I don't think many of us who do bibisects regularly have.

Revision history for this message
In , Suokunlong-j (suokunlong-j) wrote :

Close as WORKSFORME as I do not reproduce this in the most recent versions of LibreOffice under Ubuntu 15.10.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in libreoffice (Ubuntu):
status: New → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Synchronising bug status with upstream.

Changed in libreoffice (Ubuntu):
status: Incomplete → Fix Released
Changed in df-libreoffice:
importance: Unknown → High
status: Unknown → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.