Gentoo Archives: gentoo-user

From: Zdenek Travnicek <v154c1@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Slow application start, LC_CTYPE and XCreateFontSet
Date: Mon, 21 Jul 2008 23:36:14
Message-Id: 947383f90807211636s6b902409pbfdbd8ba29f41cf3@mail.gmail.com
1 Hello,
2
3 I've installed new laptop few weeks ago and everything is running fine
4 except for all (most?) X applications taking few seconds to start.
5 I've tracked the problem down with ltrace to "XCreateFontSet()" call that
6 blocks for more than 2 seconds.
7 Searching on google lead me some forums about problem with this call and
8 UTF-8 encodings.
9 Further tests showed that the problem is related only to having locale set
10 to en_US.UTF-8.
11 Setting locale to anything else seems to solve it (even en_US)
12
13 $ time LC_ALL=en_US.UTF-8 xterm -e echo
14 real 0m2.422s
15 user 0m0.010s
16 sys 0m0.012s
17
18 $ time LC_ALL=cs_CZ.UTF-8 xterm -e echo
19
20 real 0m0.065s
21 user 0m0.048s
22 sys 0m0.010s
23
24 That's probably the reason I never saw it before, I usually have some
25 non-english locale on my system. (czech/japanese/russian, none of them
26 affected)
27 Specificaly, it seems to be related to LC_CTYPE setting.
28
29 strace shows lots output similar to:
30 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
31 read(3,
32 "\1\0\212\0\0\0\0\0\0\0\351\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 32)
33 = 32
34 writev(3, [{"1\1\t\0\1\0\32\0", 8}, {"*-*-*-*-*-*-KSC5601.1987-0", 26},
35 {"\0\0", 2}], 3) = 36
36 read(3, 0x7fff831995a0, 32) = -1 EAGAIN (Resource temporarily
37 unavailable)
38
39
40 I tried to generate al locales with 'locale-gen -A' and to install some
41 other fonts (to have the same font set as on other machine where it works
42 fine) and nothing helped at all.
43
44 Any ideas how can I solve it?
45 Does it mean that I'm missing some fonts? Or something else? I'm running out
46 of ideas what to try...
47
48
49 my X server is xorg-server-1.3.0.0-r6 compiled with USE: dri
50 input_devices_joystick input_devices_keyboard input_devices_mouse
51 input_devices_synaptics ipv6 nptl sdl video_cards_nv video_cards_nvidia
52 video_cards_vesa xorg xprint
53 I generated all possible locales with locale-gen -A
54 I use fluxbox-1.0.0-r2
55
56 Any help is greatly appreciated
57
58 Zdenek Travnicek

Replies

Subject Author
Re: [gentoo-user] Slow application start, LC_CTYPE and XCreateFontSet "Vladimir G. Ivanovic" <vgivanovic@×××××××.net>