unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Display performance degradation
@ 2009-12-17  2:49 YAMAMOTO Mitsuharu
  2009-12-17  7:39 ` Jan D.
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: YAMAMOTO Mitsuharu @ 2009-12-17  2:49 UTC (permalink / raw)
  To: emacs-devel

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  <jan.h.d@swipnet.se>

	* 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
				mituharu@math.s.chiba-u.ac.jp




^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2010-01-07  8:26 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17  2:49 Display performance degradation YAMAMOTO Mitsuharu
2009-12-17  7:39 ` Jan D.
2009-12-17 20:08   ` Eli Zaretskii
2009-12-18 16:47     ` Jan Djärv
2009-12-18 21:20       ` Eli Zaretskii
2010-01-02 11:05         ` Jan Djärv
2010-01-02 11:21           ` Eli Zaretskii
2010-01-02 14:31             ` Jan Djärv
2009-12-17 12:24 ` Kenichi Handa
2009-12-17 14:43   ` Chong Yidong
2009-12-18  3:53     ` Miles Bader
2009-12-17 16:42   ` Jan Djärv
2009-12-18  3:06     ` YAMAMOTO Mitsuharu
2009-12-18  5:46     ` Kenichi Handa
2009-12-19  2:56       ` YAMAMOTO Mitsuharu
2009-12-19 10:00         ` Andreas Schwab
2009-12-20  6:27           ` YAMAMOTO Mitsuharu
2009-12-21  1:17         ` Kenichi Handa
2009-12-21  2:11           ` Miles Bader
2009-12-21  2:31             ` Lennart Borgman
2009-12-21  3:05               ` Miles Bader
2009-12-21  3:08                 ` Lennart Borgman
2009-12-21  3:44                   ` Miles Bader
2009-12-21  3:54                     ` Lennart Borgman
2009-12-21  4:16                       ` Miles Bader
2009-12-21  4:18                         ` Lennart Borgman
2010-01-06 19:46 ` Jan Djärv
2010-01-07  8:26   ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).