From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: x-create-frame is sluggish Date: Sat, 25 Sep 2004 11:39:06 +0900 (JST) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200409250239.LAA15347@etlken.m17n.org> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1096080042 19225 80.91.229.6 (25 Sep 2004 02:40:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 25 Sep 2004 02:40:42 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 25 04:40:26 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CB2U5-0007rz-00 for ; Sat, 25 Sep 2004 04:40:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CB2aC-0004f7-O5 for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2004 22:46:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CB2a4-0004dK-Cd for emacs-devel@gnu.org; Fri, 24 Sep 2004 22:46:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CB2a2-0004cf-Uf for emacs-devel@gnu.org; Fri, 24 Sep 2004 22:46:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CB2a2-0004c1-Gf for emacs-devel@gnu.org; Fri, 24 Sep 2004 22:46:34 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CB2Sv-0003N6-Pr for emacs-devel@gnu.org; Fri, 24 Sep 2004 22:39:14 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-6.6) with ESMTP id i8P2d7qf032182; Sat, 25 Sep 2004 11:39:08 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id i8P2d7U22735; Sat, 25 Sep 2004 11:39:07 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id LAA15347; Sat, 25 Sep 2004 11:39:06 +0900 (JST) Original-To: Karoly.Lorentey@cern.ch In-reply-to: (Karoly.Lorentey@cern.ch) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27554 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27554 In article , Karoly.Lorent= ey@cern.ch (L=C5=91rentey K=C3=A1roly) writes: > Creating a new X frame takes about two seconds on my system, which is > long enough a delay to be distracting. My little profiling session > determined that most of this time is spent in xic_create_fontset, > calling XCreateFontSet. Is it really necessary to create a new > fontset for each new frame? Can I do something to speed this up? > (`xlsfonts | wc -l' reports that I have 6205 fonts on my system.) I think we can cache XFontSet in struct x_display_info per each base_fontname. Then we can avoid calling of XCreateFontSet when we create a new frame on the same display with the same font. --- Ken'ichi HANDA handa@m17n.org