From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Q on performance with 10000 faces Date: Sun, 4 Jun 2006 17:29:09 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1149467378 11205 80.91.229.2 (5 Jun 2006 00:29:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Jun 2006 00:29:38 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 05 02:29:36 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fn2yI-0002Zq-GR for ged-emacs-devel@m.gmane.org; Mon, 05 Jun 2006 02:29:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fn2yH-0005gV-UR for ged-emacs-devel@m.gmane.org; Sun, 04 Jun 2006 20:29:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fn2y5-0005fy-JX for emacs-devel@gnu.org; Sun, 04 Jun 2006 20:29:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fn2y3-0005fm-Jp for emacs-devel@gnu.org; Sun, 04 Jun 2006 20:29:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fn2y3-0005fj-GG for emacs-devel@gnu.org; Sun, 04 Jun 2006 20:29:15 -0400 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1Fn355-0005Qm-9Q for emacs-devel@gnu.org; Sun, 04 Jun 2006 20:36:31 -0400 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k550TDBd008730 for ; Sun, 4 Jun 2006 19:29:14 -0500 Original-Received: from dradamslap (dhcp-amer-whq-csvpn-gw3-141-144-80-181.vpn.oracle.com [141.144.80.181]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k550TC9Q010444 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sun, 4 Jun 2006 18:29:13 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE 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:55692 Archived-At: Hi Kim, > A more complete version of the code is here, in case that helps: > http://www.emacswiki.org/cgi-bin/wiki/palette.el. Note: It depends on hexrgb.el Yes. (although is says no dependencies). You mean the "Features that might be required by this library:" comment in the file header? Yes, I forgot to byte-compile the file and load the byte-compiled version before I saved it, so that automatically generated comment didn't get updated correctly. (There is an explicit (require 'hexrgb), at least.) FYI - The way the automatic file-dependency header works is that if a byte-compiled (`*.elc') version of a library is available it is loaded, in preference to the source library - this is the standard behavior of `load-library'. The list of required features then reflects the dependencies indicated in the byte-compiled file, not the source file. If the byte-compiled file is out-of-date, so will be the file header list of possible dependencies. The code for this is here, BTW: http://www.emacswiki.org/cgi-bin/wiki/lib-requires.el (and http://www.emacswiki.org/cgi-bin/wiki/header2.el). Suggestions welcome. Anyway, I tried your code, and I don't see any apparent slowdown, once the palette frame is shown (but that takes a few seconds). Yes, it takes about 4 sec on my machine to create the palette. That's not a real problem (for me). Repeated cursor movement doesn't happen instantly with the default settings, but with (setq redisplay-dont-pause t), key response is ok. Use of that variable is not clear to me, even after reading the doc. I was thinking that non-nil would slow things down when there is pending input, by allowing redisplay instead of inhibiting it. How does non-nil improve response here? Where would you suggest binding it to non-nil - in each of the interactive functions (in the palette code) or just some in particular? I'm confused about this variable. Usage guidelines welcome. Anyway, I tried setting redisplay-dont-pause to non-nil globally, just to see what you mean, and I don't notice any improvement. I don't doubt you, but I didn't notice a change, myself. How significant is the slowdown you see? As I mentioned before, with various hooks and such that I have running in my setup, M-x takes a couple of seconds to give me the prompt (once the palette has been displayed). However, response for cursor movement, mouse clicking etc. is not a problem. It's mainly minibuffer response that is slow. That's the fault of other libraries I use, but the point is that I don't see any slowdown unless I run the palette code. IOW, it slows things down enough to be quite annoying, because I already have a lot going on. The other stuff going on I never notice, in terms of response, but in combination with the palette code, it's quite noticeable. That suggests to me that the palette code is slowing things down, and that slowdown is just not very noticeable with emacs -Q + palette. In any case, even without any special attempt at optimization, the palette seems quite usable. I'm sure there is room for optimization of my code, even apart from any possible improvement in Emacs' display of faces. [The problem I'm having now with the library is finding a font to use - each user's font selection is different. I try to pick up a small font (size 5), using a priority list of fonts and ending with whatever size-5 font can be found. But I'm not convinced that is a good solution. All I need is a small font, preferably fixed-width - and I use only two characters (space and `e').] Thanks for having taken a look.