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: Possible redisplay performance enhancements (revisited) Date: Fri, 21 Apr 2006 18:47:40 +0900 Organization: Faculty of Science, Chiba University Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1145612883 31107 80.91.229.2 (21 Apr 2006 09:48:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Apr 2006 09:48:03 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 21 11:48:00 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FWsF4-0007se-Av for ged-emacs-devel@m.gmane.org; Fri, 21 Apr 2006 11:47:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWsF3-0005YZ-ON for ged-emacs-devel@m.gmane.org; Fri, 21 Apr 2006 05:47:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FWsEr-0005X8-CJ for emacs-devel@gnu.org; Fri, 21 Apr 2006 05:47:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FWsEp-0005VW-9f for emacs-devel@gnu.org; Fri, 21 Apr 2006 05:47:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWsEp-0005VT-4w for emacs-devel@gnu.org; Fri, 21 Apr 2006 05:47:43 -0400 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FWsGL-0002Jr-Fo for emacs-devel@gnu.org; Fri, 21 Apr 2006 05:49:17 -0400 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 77DA02C7F for ; Fri, 21 Apr 2006 18:47:40 +0900 (JST) Original-To: emacs-devel@gnu.org User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) 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:53178 Archived-At: Before pretesting, I'd like to revisit some of redisplay performance issues I've mentioned in this list: 1. Excessive redraw of overlapping/overlapped rows? http://lists.gnu.org/archive/html/emacs-devel/2005-09/msg00705.html Possibly-positive response from Kim F. Storm, and possibly-negative response from David Kastrup. Now I don't think mode-line/header-line updates affect redraw of overlapped/overlapping rows, because mode-line/header-line does not overlap with the other parts. 2. Need to check face_id < BASIC_FACE_ID_SENTINEL in get_*_face_and_encoding? http://lists.gnu.org/archive/html/emacs-devel/2006-02/msg00238.html No response, but I couldn't find any reason to distinguish known faces from others with respect to encode_char. I've been using the following patch for a few months, but couldn't find any problems. So I'd like to propose installing it to CVS and see if any problems can be found (if no objections, of course). They are modifications to the platform-independent part, and some of you may not notice the difference in performace. But text drawing with ATSUI on the Mac Carbon port is sensitive to these changes. I think ATSUI support is ready to be enabled by default once these issues are solved. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp Index: src/dispnew.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/dispnew.c,v retrieving revision 1.362 diff -c -r1.362 dispnew.c *** src/dispnew.c 12 Apr 2006 06:23:11 -0000 1.362 --- src/dispnew.c 21 Apr 2006 08:47:15 -0000 *************** *** 4156,4162 **** update_window_line (w, MATRIX_ROW_VPOS (mode_line_row, desired_matrix), &mouse_face_overwritten_p); - changed_p = 1; } /* Find first enabled row. Optimizations in redisplay_internal --- 4156,4161 ---- *************** *** 4226,4232 **** { header_line_row->y = 0; update_window_line (w, 0, &mouse_face_overwritten_p); - changed_p = 1; } /* Fix the appearance of overlapping/overlapped rows. */ --- 4225,4230 ---- Index: src/xdisp.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v retrieving revision 1.1089 diff -c -r1.1089 xdisp.c *** src/xdisp.c 20 Apr 2006 23:03:03 -0000 1.1089 --- src/xdisp.c 21 Apr 2006 08:47:17 -0000 *************** *** 18495,18502 **** sure to use a face suitable for unibyte. */ STORE_XCHAR2B (char2b, 0, glyph->u.ch); } ! else if (glyph->u.ch < 128 ! && glyph->face_id < BASIC_FACE_ID_SENTINEL) { /* Case of ASCII in a face known to fit ASCII. */ STORE_XCHAR2B (char2b, 0, glyph->u.ch); --- 18495,18501 ---- sure to use a face suitable for unibyte. */ STORE_XCHAR2B (char2b, 0, glyph->u.ch); } ! else if (glyph->u.ch < 128) { /* Case of ASCII in a face known to fit ASCII. */ STORE_XCHAR2B (char2b, 0, glyph->u.ch); *************** *** 18897,18903 **** face_id = FACE_FOR_CHAR (f, face, c); face = FACE_FROM_ID (f, face_id); } ! else if (c < 128 && face_id < BASIC_FACE_ID_SENTINEL) { /* Case of ASCII in a face known to fit ASCII. */ STORE_XCHAR2B (char2b, 0, c); --- 18896,18902 ---- face_id = FACE_FOR_CHAR (f, face, c); face = FACE_FROM_ID (f, face_id); } ! else if (c < 128) { /* Case of ASCII in a face known to fit ASCII. */ STORE_XCHAR2B (char2b, 0, c);