emacs-devel
[Top][All Lists]
Advanced

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

Display performance degradation


From: YAMAMOTO Mitsuharu
Subject: Display performance degradation
Date: Thu, 17 Dec 2009 11:49:01 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

I can observe significant display performance degradation on Emacs
23.1.90 compared with 23.1, especially when scrolling TUTORIAL.ja on a
frame that uses the xft font backend.  I also observe the increase of
the total number of xftfont_draw calls, and a string in a single font
and color, which was originally displayed by one call, is now
unnecessarily divided into smaller units.

As an experiment, I tried restoring the following change, and then the
performance became comparable to 23.1.

2009-11-17  Jan Djärv  <address@hidden>

        * font.c (font_open_entity): Do not use cache, it does not pick up new
        fontconfig settings like hinting.

*** 2975,2985 ****
--- 2987,3001 ----
    else if (CONSP (Vface_font_rescale_alist))
      scaled_pixel_size = pixel_size * font_rescale_ratio (entity);
  
+ #if 0
+   /* This doesn't work if you have changed hinting or any other parameter.
+      We need to make a new object in every case to be sure. */
    for (objlist = AREF (entity, FONT_OBJLIST_INDEX); CONSP (objlist);
         objlist = XCDR (objlist))
      if (! NILP (AREF (XCAR (objlist), FONT_TYPE_INDEX))
        && XFONT_OBJECT (XCAR (objlist))->pixel_size == pixel_size)
        return  XCAR (objlist);
+ #endif
  
    val = AREF (entity, FONT_TYPE_INDEX);
    for (driver_list = f->font_driver_list;

The added comment implies that the simple removal of #if 0 causes
another problem for some cases, but I think creating a new font object
for each call is too much for the usual cases.  Perhaps this part
needs some improvement.

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

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