all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
Subject: Slow frame creation when many faces defined
Date: Sat, 12 Nov 2005 19:56:24 +0000	[thread overview]
Message-ID: <36FCC05F-335C-4636-AA20-9421BC6C3520@gmail.com> (raw)

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.

             reply	other threads:[~2005-11-12 19:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-12 19:56 David Reitter [this message]
2005-11-12 21:07 ` Slow frame creation when many faces defined Drew Adams
2005-11-13 20:54 ` Richard M. Stallman
2005-11-13 23:38   ` Kim F. Storm
2005-11-14  8:33     ` David Reitter
2005-11-14  9:24       ` Kim F. Storm
2005-11-15  8:11 ` YAMAMOTO Mitsuharu
2005-11-15 11:51   ` David Reitter
2005-11-15 16:47     ` Drew Adams

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=36FCC05F-335C-4636-AA20-9421BC6C3520@gmail.com \
    --to=david.reitter@gmail.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.