From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Display performance degradation Date: Thu, 17 Dec 2009 11:49:01 +0900 Organization: Faculty of Science, Chiba University Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1261018165 26081 80.91.229.12 (17 Dec 2009 02:49:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Dec 2009 02:49:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 17 03:49:17 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NL6QW-00034n-MD for ged-emacs-devel@m.gmane.org; Thu, 17 Dec 2009 03:49:16 +0100 Original-Received: from localhost ([127.0.0.1]:53094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NL6QW-00071r-Pv for ged-emacs-devel@m.gmane.org; Wed, 16 Dec 2009 21:49:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NL6QS-00071m-BJ for emacs-devel@gnu.org; Wed, 16 Dec 2009 21:49:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NL6QM-00071A-MQ for emacs-devel@gnu.org; Wed, 16 Dec 2009 21:49:11 -0500 Original-Received: from [199.232.76.173] (port=59997 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NL6QM-000717-HQ for emacs-devel@gnu.org; Wed, 16 Dec 2009 21:49:06 -0500 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2]:61906 helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NL6QM-00070X-1B for emacs-devel@gnu.org; Wed, 16 Dec 2009 21:49:06 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 45D6FC0557 for ; Thu, 17 Dec 2009 11:49:01 +0900 (JST) User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by monty-python.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118668 Archived-At: 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=E4rv * 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 =3D pixel_size * font_rescale_ratio (entity); =20 + #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 =3D AREF (entity, FONT_OBJLIST_INDEX); CONSP (objlist); objlist =3D XCDR (objlist)) if (! NILP (AREF (XCAR (objlist), FONT_TYPE_INDEX)) && XFONT_OBJECT (XCAR (objlist))->pixel_size =3D=3D pixel_size) return XCAR (objlist); + #endif =20 val =3D AREF (entity, FONT_TYPE_INDEX); for (driver_list =3D 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