From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [sacha@myxomop.com: Re: XCreateFontSet called for each X window emacs frame is heavy] Date: Sun, 01 Jul 2007 12:32:13 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1183307732 31902 80.91.229.12 (1 Jul 2007 16:35:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2007 16:35:32 +0000 (UTC) To: emacs-devel@gnu.org, handa@m17n.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 01 18:35:30 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I52OT-0007Kf-OO for ged-emacs-devel@m.gmane.org; Sun, 01 Jul 2007 18:35:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I52OT-0000mg-7S for ged-emacs-devel@m.gmane.org; Sun, 01 Jul 2007 12:35:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I52LQ-0007IS-7K for emacs-devel@gnu.org; Sun, 01 Jul 2007 12:32:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I52LP-0007Hw-As for emacs-devel@gnu.org; Sun, 01 Jul 2007 12:32:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I52LP-0007Hl-4g for emacs-devel@gnu.org; Sun, 01 Jul 2007 12:32:15 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I52LO-0003qy-Ic for emacs-devel@gnu.org; Sun, 01 Jul 2007 12:32:14 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1I52LN-0006uy-Ny; Sun, 01 Jul 2007 12:32:13 -0400 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74126 Archived-At: Would someone please DTRT and ack? I have enclosed two messages. Handa, this is in your area. Mail-Followup-To: emacs-devel@gnu.org To: emacs-devel@gnu.org From: Alexander Kotelnikov Date: Sat, 30 Jun 2007 16:39:36 +0400 Organization: Global disintoxication Lines: 78 Message-ID: <87abuhaa5z.fsf@myxomop.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 81.211.124.120.adsl-spb.net.rol.ru Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:opXAu8XBgYeajjmsERvxCfD2/l4= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) Subject: XCreateFontSet called for each X window emacs frame is heavy X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-devel-bounces+rms=gnu.org@gnu.org Errors-To: emacs-devel-bounces+rms=gnu.org@gnu.org X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) Hello. I think it is years now since I had noticed that every new emacs frame either first or any subsequent makes all my computers feel bad. X display stands still, cursor moves, but does not respond to clicks, focus switches slowly. This continues of a split second, but it hurts, I assure you. I do not know any other program, that causes such problems. Today I performed the following steps: 1. Checked that this feature is reproducible with emacs-snapshot from Debian/unstable. 2. Got emacs21 sources, built them and started emacs in debugger. Here is the place the trouble occurs: Breakpoint 15, create_frame_xic (f=0x849a8c0) at xfns.c:3348 3348 { (gdb) cont Continuing. Breakpoint 17, xic_create_xfontset (f=0x849a8c0, base_fontname=0xbfdbc270 "-*-*-medium-r-normal--13-*-*-*-*-*-*-*") at xfns.c:3310 3310 xfs = XCreateFontSet (FRAME_X_DISPLAY (f), I suppose really a lot of fonts match this pattern. Let's think, if something can be done to improve the situation. Thank you for your attention backtrace: #0 xic_create_xfontset (f=, base_fontname=) at xfns.c:3318 #1 0x080c876a in create_frame_xic (f=0x849a8c0) at xfns.c:3408 #2 0x080ca834 in x_window (f=0x849a8c0) at xfns.c:3842 #3 0x080cee1a in Fx_create_frame (parms=1480533300) at xfns.c:4433 #4 0x08135684 in Ffuncall (nargs=2, args=0xbfdbc488) at eval.c:2659 #5 0x08161790 in Fbyte_code (bytestr=941887248, vector=1210322784, maxdepth=5) at bytecode.c:716 #6 0x081351c4 in funcall_lambda (fun=1210322660, nargs=1, arg_vector=0xbfdbc5b4) at eval.c:2851 #7 0x081355a6 in Ffuncall (nargs=2, args=0xbfdbc5b0) at eval.c:2716 #8 0x08161790 in Fbyte_code (bytestr=941841804, vector=1210277296, maxdepth=3) at bytecode.c:716 #9 0x081351c4 in funcall_lambda (fun=1210277212, nargs=1, arg_vector=0xbfdbc6d4) at eval.c:2851 #10 0x081355a6 in Ffuncall (nargs=2, args=0xbfdbc6d0) at eval.c:2716 #11 0x08161790 in Fbyte_code (bytestr=941838140, vector=1210273700, maxdepth=4) at bytecode.c:716 #12 0x081351c4 in funcall_lambda (fun=1210273568, nargs=0, arg_vector=0xbfdbc7f4) at eval.c:2851 #13 0x081355a6 in Ffuncall (nargs=1, args=0xbfdbc7f0) at eval.c:2716 #14 0x08161790 in Fbyte_code (bytestr=941992740, vector=1210429452, maxdepth=5) at bytecode.c:716 #15 0x081351c4 in funcall_lambda (fun=1210428172, nargs=0, arg_vector=0xbfdbc924) at eval.c:2851 #16 0x081355a6 in Ffuncall (nargs=1, args=0xbfdbc920) at eval.c:2716 #17 0x08161790 in Fbyte_code (bytestr=941988804, vector=1210424404, maxdepth=5) at bytecode.c:716 #18 0x081351c4 in funcall_lambda (fun=1210424236, nargs=0, arg_vector=0xbfdbc9f0) at eval.c:2851 #19 0x081353c4 in apply_lambda (fun=1210424236, args=405279788, eval_flag=1) at eval.c:2770 #20 0x0813469a in Feval (form=1480204196) at eval.c:2071 #21 0x080dd753 in top_level_2 () at keyboard.c:1254 #22 0x081341bf in internal_condition_case (bfun=0x80dd740 , handlers=405376132, hfun=0x80dfdc0 ) at eval.c:1267 #23 0x080df8f1 in top_level_1 () at keyboard.c:1262 #24 0x08134274 in internal_catch (tag=405337716, func=0x80df8c0 , arg=405279788) at eval.c:1030 #25 0x080dfa8a in command_loop () at keyboard.c:1223 #26 0x080dfb5b in recursive_edit_1 () at keyboard.c:950 #27 0x080dfc83 in Frecursive_edit () at keyboard.c:1006 #28 0x080d7f02 in main (argc=1, argv=0xbfdbd144, envp=0x0) at emacs.c:1547 -- Alexander Kotelnikov Saint-Petersburg, Russia ------- Start of forwarded message ------- X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.1.0 To: rms@gnu.org Subject: Re: XCreateFontSet called for each X window emacs frame is heavy From: Alexander Kotelnikov Organization: Global disintoxication Mail-Copies-To: never Date: Sun, 01 Jul 2007 14:50:19 +0400 In-Reply-To: (Richard Stallman's message of "Sat, 30 Jun 2007 20:30:23 -0400") MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Still there. But it appears only in UTF-8 locales (I use ru_RU, but checked with fr_FR and en_US). The problem is the last XCreateFontSet in enclosed gdb log. >>>>> On Sat, 30 Jun 2007 20:30:23 -0400 >>>>> "RS" == Richard Stallman wrote: RS> RS> Would you like to try the latest Emacs release, 22.1, RS> and see if it has the same problem? 14:34 pts/18 sacha@benington:/tmp/emacs-22.1 8> gdb src/emacs GNU gdb 6.4.90-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/li bthread_db.so.1". (gdb) break create_frame_xic Breakpoint 1 at 0x80cf239: file xfns.c, line 2257. (gdb) break xic_create_xfontset Breakpoint 2 at 0x80cef8b: file xfns.c, line 2133. (gdb) cont The program is not being run. (gdb) start Breakpoint 3 at 0x80e6487: file emacs.c, line 822. Starting program: /tmp/emacs-22.1/src/emacs [Thread debugging using libthread_db enabled] [New Thread -1212270912 (LWP 30923)] [Switching to Thread -1212270912 (LWP 30923)] main (argc=1, argv=0xbfdb2154) at emacs.c:822 822 stack_base = &dummy; (gdb) cont Continuing. Breakpoint 1, create_frame_xic (f=0x85c3fe8) at xfns.c:2257 2257 { (gdb) cont Continuing. Breakpoint 2, xic_create_xfontset (f=0x85c3fe8, base_fontname=0x8591aa4 "-monotype-courier new-medium-r-normal--13-92-100-100-m-80-ado be-standard") at xfns.c:2133 2133 if (!base_fontname) (gdb) next 2126 { (gdb) 2128 char **missing_list = NULL; (gdb) 2133 if (!base_fontname) (gdb) 2137 FOR_EACH_FRAME (rest, frame) (gdb) 2139 struct frame *cf = XFRAME (frame); (gdb) 2140 if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf) (gdb) 2152 char *fontsetname = xic_create_fontsetname (base_fontname, False); (gdb) 2155 xfs = XCreateFontSet (FRAME_X_DISPLAY (f), (gdb) 2152 char *fontsetname = xic_create_fontsetname (base_fontname, False); (gdb) 2155 xfs = XCreateFontSet (FRAME_X_DISPLAY (f), (gdb) 2158 if (missing_list) (gdb) 2160 if (! xfs) (gdb) p fontsetname $1 = 0x85d0c80 "-monotype-courier new-medium-r-normal-*-13-92-100-100-m-80-adobe-standard, - -monotype-courier new-medium-r-normal-*-13-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-13-*-*-*-* - -*-*-*,-*-*-*-*-*-*-13-*-*-*-*-*-*-*" (gdb) - -- Alexander Kotelnikov Saint-Petersburg, Russia ------- End of forwarded message -------