From: Kenichi Handa <handa@m17n.org>
To: rms@gnu.org
Cc: sacha@myxomop.com, emacs-devel@gnu.org
Subject: Re: [sacha@myxomop.com: Re: XCreateFontSet called for each X window emacs frame is heavy]
Date: Wed, 18 Jul 2007 10:21:27 +0900 [thread overview]
Message-ID: <E1IAyEJ-0007aQ-W9@etlken.m17n.org> (raw)
In-Reply-To: <E1I52LN-0006uy-Ny@fencepost.gnu.org> (message from Richard Stallman on Sun, 01 Jul 2007 12:32:13 -0400)
Sorry for the late response.
In article <E1I52LN-0006uy-Ny@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:
> Would someone please DTRT and ack? I have enclosed two messages.
> Handa, this is in your area.
> From: Alexander Kotelnikov <sacha@myxomop.com>
> Date: Sat, 30 Jun 2007 16:39:36 +0400
> Subject: XCreateFontSet called for each X window emacs frame is heavy
[...]
> 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.
[...]
> 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-*-*-*-*-*-*-*"
I've never met such a problem, and it's very surprising that
XCreateFontSet is that slow.
Could you please compile the attached program (xfs.c), run
it with these arguments:
% ./xfs '-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-*-*-*-*-*-*-*'
%./xfs ''-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-*-*-*-*-*-*-*'
%./xfs ''-monotype-courier new-medium-r-normal-*-13-92-100-100-m-80-adobe-standard,-monotype-courier new-medium-r-normal-*-13-*-*-*-*-*-*-*'
and check if they are surely slow?
And also please investigate why the following code in
xic_create_xfontset doesn't find an already created fontset
for the second and the other frames.
/* See if there is another frame already using same fontset. */
FOR_EACH_FRAME (rest, frame)
{
struct frame *cf = XFRAME (frame);
if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf)
&& FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f)
&& FRAME_XIC_BASE_FONTNAME (cf)
&& !strcmp (FRAME_XIC_BASE_FONTNAME (cf), base_fontname))
{
xfs = FRAME_XIC_FONTSET (cf);
break;
}
}
---
Kenichi Handa
handa@m17n.org
--------------------- xfs.c -------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <X11/Xlib.h>
int
main (int argc, char **argv)
{
Display *display;
XFontSet xfs = NULL;
char **missing_list = NULL;
int missing_count;
char *def_string;
setlocale (LC_ALL, "");
display = XOpenDisplay (NULL);
xfs = XCreateFontSet (display, argv[1], &missing_list, &missing_count,
&def_string);
if (! xfs)
printf ("Fontset can't be created from \"%s\".\n", argv[1]);
else
{
printf ("Fontset created successfully.\n");
if (missing_list)
{
int i;
printf ("Missing fonts:\n");
for (i = 0; i < missing_count; i++)
printf (" %s\n", missing_list[i]);
XFreeStringList (missing_list);
}
XFreeFontSet (display, xfs);
}
XCloseDisplay (display);
exit (0);
}
prev parent reply other threads:[~2007-07-18 1:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-01 16:32 [sacha@myxomop.com: Re: XCreateFontSet called for each X window emacs frame is heavy] Richard Stallman
2007-07-18 1:21 ` Kenichi Handa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1IAyEJ-0007aQ-W9@etlken.m17n.org \
--to=handa@m17n.org \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
--cc=sacha@myxomop.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.