changeset 9530:a605bfe5bf8a

(redisplay): Call clear_face_cache instead of clear_face_vector. Do it at most once per 1000 redisplays.
author Richard M. Stallman <rms@gnu.org>
date Fri, 14 Oct 1994 05:20:15 +0000
parents 8e610355cb29
children 41a73e2f439e
files src/xdisp.c
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Fri Oct 14 05:19:13 1994 +0000
+++ b/src/xdisp.c	Fri Oct 14 05:20:15 1994 +0000
@@ -545,6 +545,10 @@
 
 static int do_verify_charstarts;
 
+/* Counter is used to clear the face cache
+   no more than once ever 1000 redisplays.  */
+static int clear_face_cache_count;
+
 void
 redisplay ()
 {
@@ -732,14 +736,20 @@
   this_line_bufpos = 0;
   all_windows |= buffer_shared > 1;
 
+  clear_face_cache_count++;
+
   if (all_windows)
     {
       Lisp_Object tail, frame;
 
 #ifdef HAVE_X_WINDOWS
-      /* Since we're doing a thorough redisplay, we might as well
-	 recompute all our display faces.  */
-      clear_face_vector ();
+      /* Clear the face cache, only when we do a full redisplay
+	 and not too often either.  */
+      if (clear_face_cache_count > 1000)
+	{
+	  clear_face_cache ();
+	  clear_face_cache_count = 0;
+	}
 #endif
 
       /* Recompute # windows showing selected buffer.