emacs-devel
[Top][All Lists]
Advanced

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

Re: X performance suffers under emacs 21.1.1


From: Richard Stallman
Subject: Re: X performance suffers under emacs 21.1.1
Date: Sat, 8 Dec 2001 06:18:17 -0700 (MST)

I think I found out why clear_image_cache is not doing the job: it is
not being called.  There is no call in the Lisp code.  The only call
in the C code is from clear_face_cache.

clear_face_cache is called once every 10000 full redisplays.  If a
full redisplay happens once a second (which is unlikely), 10000 of
them would take three hours.  Evidently this is not often enough to
keep the image cache clear.

So I think I know what to do here.  Daniel, would you please try this patch?

*** xdisp.c.~1.711.~    Mon Dec  3 20:07:37 2001
--- xdisp.c     Fri Dec  7 22:25:54 2001
***************
*** 7223,7229 ****
         frame_title_ptr so that display_mode_element will output into it;
         then display the title.  */
        obuf = current_buffer;
!       Fset_buffer (XWINDOW (f->selected_window)->buffer);
        fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format;
        frame_title_ptr = frame_title_buf;
        init_iterator (&it, XWINDOW (f->selected_window), -1, -1,
--- 7223,7229 ----
         frame_title_ptr so that display_mode_element will output into it;
         then display the title.  */
        obuf = current_buffer;
!       set_buffer_internal_1 (XBUFFER (XWINDOW (f->selected_window)->buffer));
        fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format;
        frame_title_ptr = frame_title_buf;
        init_iterator (&it, XWINDOW (f->selected_window), -1, -1,
***************
*** 7231,7237 ****
        display_mode_element (&it, 0, -1, -1, fmt);
        len = frame_title_ptr - frame_title_buf;
        frame_title_ptr = NULL;
!       set_buffer_internal (obuf);
  
        /* Set the title only if it's changed.  This avoids consing in
         the common case where it hasn't.  (If it turns out that we've
--- 7231,7237 ----
        display_mode_element (&it, 0, -1, -1, fmt);
        len = frame_title_ptr - frame_title_buf;
        frame_title_ptr = NULL;
!       set_buffer_internal_1 (obuf);
  
        /* Set the title only if it's changed.  This avoids consing in
         the common case where it hasn't.  (If it turns out that we've
***************
*** 8805,8810 ****
--- 8805,8813 ----
          
          if (FRAME_WINDOW_P (f) || f == sf)
            {
+             if (clear_face_cache_count % 50 == 0)
+               clear_image_cache (f, 0);
+ 
              /* Mark all the scroll bars to be removed; we'll redeem
                 the ones we want when we redisplay their windows.  */
              if (condemn_scroll_bars_hook)



reply via email to

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