unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Slow frame creation when many faces defined
@ 2005-11-12 19:56 David Reitter
  2005-11-12 21:07 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: David Reitter @ 2005-11-12 19:56 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-11-15 16:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-12 19:56 Slow frame creation when many faces defined David Reitter
2005-11-12 21:07 ` 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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).