[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Slow frame creation when many faces defined

From: David Reitter
Subject: Slow frame creation when many faces defined
Date: Sat, 12 Nov 2005 19:56:24 +0000

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 via email to

[Prev in Thread] Current Thread [Next in Thread]