Gentoo Archives: gentoo-user

From: "Vladimir G. Ivanovic" <vgivanovic@×××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Slow application start, LC_CTYPE and XCreateFontSet
Date: Wed, 23 Jul 2008 15:20:50
Message-Id: 48874C47.8090501@comcast.net
In Reply to: [gentoo-user] Slow application start, LC_CTYPE and XCreateFontSet by Zdenek Travnicek
1 Initially I had similar behavior as you, except that en_US.UTF-8 was
2 faster and others slower (my laptop is a 1.8 GHz AMD64).
3
4 But, after repeated invocations of 'time xterm ...' all versions
5 settled down to the same value: ~0.25 seconds.
6
7 Maybe you should post your question on some X-related mailing list.
8
9 --- Vladimir
10
11 on 07/21/2008 04:36 PM Zdenek Travnicek said the following:
12 > Hello,
13 >
14 > I've installed new laptop few weeks ago and everything is running fine
15 > except for all (most?) X applications taking few seconds to start.
16 > I've tracked the problem down with ltrace to "XCreateFontSet()" call
17 > that blocks for more than 2 seconds.
18 > Searching on google lead me some forums about problem with this call and
19 > UTF-8 encodings.
20 > Further tests showed that the problem is related only to having locale
21 > set to en_US.UTF-8.
22 > Setting locale to anything else seems to solve it (even en_US)
23 >
24 > $ time LC_ALL=en_US.UTF-8 xterm -e echo
25 > real 0m2.422s
26 > user 0m0.010s
27 > sys 0m0.012s
28 >
29 > $ time LC_ALL=cs_CZ.UTF-8 xterm -e echo
30 >
31 > real 0m0.065s
32 > user 0m0.048s
33 > sys 0m0.010s
34 >
35 > That's probably the reason I never saw it before, I usually have some
36 > non-english locale on my system. (czech/japanese/russian, none of them
37 > affected)
38 > Specificaly, it seems to be related to LC_CTYPE setting.
39 >
40 > strace shows lots output similar to:
41 > poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
42 > read(3,
43 > "\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",
44 > 32) = 32
45 > writev(3, [{"1\1\t\0\1\0\32\0", 8}, {"*-*-*-*-*-*-KSC5601.1987-0", 26},
46 > {"\0\0", 2}], 3) = 36
47 > read(3, 0x7fff831995a0, 32) = -1 EAGAIN (Resource
48 > temporarily unavailable)
49 >
50 >
51 > I tried to generate al locales with 'locale-gen -A' and to install some
52 > other fonts (to have the same font set as on other machine where it
53 > works fine) and nothing helped at all.
54 >
55 > Any ideas how can I solve it?
56 > Does it mean that I'm missing some fonts? Or something else? I'm running
57 > out of ideas what to try...
58 >
59 >
60 > my X server is xorg-server-1.3.0.0-r6 compiled with USE: dri
61 > input_devices_joystick input_devices_keyboard input_devices_mouse
62 > input_devices_synaptics ipv6 nptl sdl video_cards_nv video_cards_nvidia
63 > video_cards_vesa xorg xprint
64 > I generated all possible locales with locale-gen -A
65 > I use fluxbox-1.0.0-r2
66 >
67 > Any help is greatly appreciated
68 >
69 > Zdenek Travnicek
70 >
71
72 --
73 Vladimir G. Ivanovic

Attachments

File name MIME type
signature.asc application/pgp-signature