From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1KL4vO-0003ci-DW for garchives@archives.gentoo.org; Mon, 21 Jul 2008 23:36:14 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7BD0DE04BE; Mon, 21 Jul 2008 23:36:12 +0000 (UTC) Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.157]) by pigeon.gentoo.org (Postfix) with ESMTP id 5299EE04BE for ; Mon, 21 Jul 2008 23:36:12 +0000 (UTC) Received: by yw-out-1718.google.com with SMTP id 5so604946ywm.46 for ; Mon, 21 Jul 2008 16:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=2TKrstZ4XFceCwTbHVNs9wasIkwoJ45qWeQ74vYvicI=; b=aWrIEauGmFCD6u57NQ8AWxDfsnsgUxiJhz04J8WEmcPE6MRBk1J/C9Y5cYbTg2kGG/ iA4mFnjTbVDqdZdnuCIoW7y8qxVe5/9+HfnuHt7zan6rbhCmRWJJCHdTSe3mCIbFXgod w2fFLO1x1ztmsfAJjA/VKXQY/yyO/vxL6vCRo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=NFmFcU9Ob0y8+Srp9JArYVa8PCES5IOGIlIA8nSsbZl2wfePWmt92Jb/G5u6vdQv3Y vzlQtk+RDwQCkNgtuZFqYK6jn5KlHwR0JlfwW6uGyRAB17SFL2MzRKAxk3t2WgnpyXDe wC8f62CZVNmeSFOCXZ1c3gKoc124wd+t4NbtQ= Received: by 10.150.52.2 with SMTP id z2mr4571671ybz.46.1216683371927; Mon, 21 Jul 2008 16:36:11 -0700 (PDT) Received: by 10.150.186.13 with HTTP; Mon, 21 Jul 2008 16:36:11 -0700 (PDT) Message-ID: <947383f90807211636s6b902409pbfdbd8ba29f41cf3@mail.gmail.com> Date: Tue, 22 Jul 2008 01:36:11 +0200 From: "Zdenek Travnicek" To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] Slow application start, LC_CTYPE and XCreateFontSet Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17763_22108660.1216683371924" X-Archives-Salt: d986b589-12ec-4e9d-bd0a-73774382e545 X-Archives-Hash: dd3e3f2e5d995d706c38eaa762e3789b ------=_Part_17763_22108660.1216683371924 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I've installed new laptop few weeks ago and everything is running fine except for all (most?) X applications taking few seconds to start. I've tracked the problem down with ltrace to "XCreateFontSet()" call that blocks for more than 2 seconds. Searching on google lead me some forums about problem with this call and UTF-8 encodings. Further tests showed that the problem is related only to having locale set to en_US.UTF-8. Setting locale to anything else seems to solve it (even en_US) $ time LC_ALL=en_US.UTF-8 xterm -e echo real 0m2.422s user 0m0.010s sys 0m0.012s $ time LC_ALL=cs_CZ.UTF-8 xterm -e echo real 0m0.065s user 0m0.048s sys 0m0.010s That's probably the reason I never saw it before, I usually have some non-english locale on my system. (czech/japanese/russian, none of them affected) Specificaly, it seems to be related to LC_CTYPE setting. strace shows lots output similar to: poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1 read(3, "\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) = 32 writev(3, [{"1\1\t\0\1\0\32\0", 8}, {"*-*-*-*-*-*-KSC5601.1987-0", 26}, {"\0\0", 2}], 3) = 36 read(3, 0x7fff831995a0, 32) = -1 EAGAIN (Resource temporarily unavailable) I tried to generate al locales with 'locale-gen -A' and to install some other fonts (to have the same font set as on other machine where it works fine) and nothing helped at all. Any ideas how can I solve it? Does it mean that I'm missing some fonts? Or something else? I'm running out of ideas what to try... my X server is xorg-server-1.3.0.0-r6 compiled with USE: dri input_devices_joystick input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 nptl sdl video_cards_nv video_cards_nvidia video_cards_vesa xorg xprint I generated all possible locales with locale-gen -A I use fluxbox-1.0.0-r2 Any help is greatly appreciated Zdenek Travnicek ------=_Part_17763_22108660.1216683371924 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hello,

I've installed new laptop few weeks ago and everything is running fine except for all (most?) X applications taking few seconds to start.
I've tracked the problem down with ltrace to "XCreateFontSet()" call that blocks for more than 2 seconds.
Searching on google lead me some forums about problem with this call and UTF-8 encodings.
Further tests showed that the problem is related only to having locale set to en_US.UTF-8.
Setting locale to anything else seems to solve it (even en_US)

$ time LC_ALL=en_US.UTF-8 xterm -e echo
real    0m2.422s
user    0m0.010s
sys     0m0.012s

$ time LC_ALL=cs_CZ.UTF-8 xterm -e echo

real    0m0.065s
user    0m0.048s
sys     0m0.010s

That's probably the reason I never saw it before, I usually have some non-english locale on my system. (czech/japanese/russian, none of them affected)
Specificaly, it seems to be related to LC_CTYPE setting.

strace shows lots output similar to:
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3, "\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) = 32
writev(3, [{"1\1\t\0\1\0\32\0", 8}, {"*-*-*-*-*-*-KSC5601.1987-0", 26}, {"\0\0", 2}], 3) = 36
read(3, 0x7fff831995a0, 32)             = -1 EAGAIN (Resource temporarily unavailable)


I tried to generate al locales with 'locale-gen -A' and to install some other fonts (to have the same font set as on other machine where it works fine) and nothing helped at all.

Any ideas how can I solve it?
Does it mean that I'm missing some fonts? Or something else? I'm running out of ideas what to try...


my X server is xorg-server-1.3.0.0-r6 compiled with USE: dri input_devices_joystick input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 nptl sdl video_cards_nv video_cards_nvidia video_cards_vesa xorg xprint
I generated all possible locales with locale-gen -A
I use fluxbox-1.0.0-r2

Any help is greatly appreciated

Zdenek Travnicek

------=_Part_17763_22108660.1216683371924--