From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Slow frame creation when many faces defined Date: Sat, 12 Nov 2005 19:56:24 +0000 Message-ID: <36FCC05F-335C-4636-AA20-9421BC6C3520@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131825410 30459 80.91.229.2 (12 Nov 2005 19:56:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Nov 2005 19:56:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 12 20:56:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eb1UP-0000DG-Hn for ged-emacs-devel@m.gmane.org; Sat, 12 Nov 2005 20:56:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eb1UO-0001dh-VT for ged-emacs-devel@m.gmane.org; Sat, 12 Nov 2005 14:56:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Eb1UG-0001dc-7M for emacs-devel@gnu.org; Sat, 12 Nov 2005 14:56:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Eb1UE-0001bV-OD for emacs-devel@gnu.org; Sat, 12 Nov 2005 14:56:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eb1UE-0001bI-Jd for emacs-devel@gnu.org; Sat, 12 Nov 2005 14:56:30 -0500 Original-Received: from [64.233.162.199] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Eb1UE-0006yp-TA for emacs-devel@gnu.org; Sat, 12 Nov 2005 14:56:31 -0500 Original-Received: by zproxy.gmail.com with SMTP id j2so874938nzf for ; Sat, 12 Nov 2005 11:56:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=mzHsAf0plapLLyZ/f3B6Tg1D7kArH4Io4244BjjtGP/BkIJX5+FaZexEgvqT2SlAqLVJ54Tn8ycqx5cvtu6COhv45y+Ke3MxfKldVsjeZdUChkUj6hZhaA1COTY2ozhyj2RUuJHuEaRZJ4v5o+D+2+wEPMWSQNShpiGbIIB+pho= Original-Received: by 10.65.83.18 with SMTP id k18mr1722852qbl; Sat, 12 Nov 2005 11:56:29 -0800 (PST) Original-Received: from ?10.0.0.34? ( [82.13.31.46]) by mx.gmail.com with ESMTP id e18sm727796qbe.2005.11.12.11.56.27; Sat, 12 Nov 2005 11:56:28 -0800 (PST) Original-To: Emacs-Devel ' X-Mailer: Apple Mail (2.746.2) 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:45833 Archived-At: I've got a question about a noticeable lag in frame creation when many frames are defined. This can be reproduced with (let ((n 0)) (while (< n 1000) (make-face (make-symbol "someface")) (setq n (1+ n))) ) then do C-x 5 2. This creates a lag of several seconds.; In a realistic setting I've got around 400-600 faces listed in face- new-frame-defaults, but they are obviously more complex than what is created in the simplified example above. The reason for that is that in a longer session, more and more faces are defined as I apply different sets of themes depending on the different types of buffers I use. Some of them -- those that I use as defaults for different modes -- are saved in my custom-file. (I'm using color-theme to define the faces.) What is the recommended strategy for managing faces? Can I make a buffer-local face that is not also created globally and avoid the persistency of faces? Can I delete a face? Would themes provide a solution here? Can frame creation in the presence of face definitions be sped up? I noticed that the (face-set-after-frame-default frame) call in x- create-frame-with-faces causes. There is a "(dolist (face (face- list)) ... )" in that function, which slows things down a lot.