emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: slow redisplay after changing cursor color


From: Richard Stallman
Subject: Re: slow redisplay after changing cursor color
Date: Mon, 13 Sep 2004 03:01:22 -0400

    (require 'cl)
    (loop for i from 0 to 500 by 1
          do (set-cursor-color (if (eq 1 (mod i 2))
                                "blue"
                              "red"))
          (sit-for 0))

I figured out why this is so slow.  Every time it changes
the cursor color, this alters the cursor-color face, and that
causes init_iterator to call free_all_realized_faces.
That empties the face cache, so all the faces have to
be realized again.  This does a lot of consing, so
it causes GC also.

The only solution I see is to arrange that changing a user-level
face won't do free_all_realized_faces.  Perhaps it could do this
only if the font has actually been used in a realized face.

Is anyone interested in working on that?




reply via email to

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