From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Display performance degradation Date: Fri, 18 Dec 2009 23:20:17 +0200 Message-ID: <83r5qs569a.fsf@gnu.org> References: <4B29E046.8050107@swipnet.se> <838wd1749d.fsf@gnu.org> <4B2BB21A.8050709@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1261171250 7535 80.91.229.12 (18 Dec 2009 21:20:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Dec 2009 21:20:50 +0000 (UTC) Cc: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org To: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 18 22:20:42 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 1NLkFe-0006Qg-7i for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2009 22:20:42 +0100 Original-Received: from localhost ([127.0.0.1]:45702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLkFe-0001wb-6i for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2009 16:20:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLkDP-0007tk-Pc for emacs-devel@gnu.org; Fri, 18 Dec 2009 16:18:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLkDL-0007oO-1i for emacs-devel@gnu.org; Fri, 18 Dec 2009 16:18:23 -0500 Original-Received: from [199.232.76.173] (port=55167 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLkDK-0007oE-Rg for emacs-devel@gnu.org; Fri, 18 Dec 2009 16:18:18 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:50961) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLkDK-0001vN-Rh for emacs-devel@gnu.org; Fri, 18 Dec 2009 16:18:19 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KUV00L009Q6Z700@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Fri, 18 Dec 2009 23:18:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.160.137]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KUV00L6R9U6IB20@a-mtaout22.012.net.il>; Fri, 18 Dec 2009 23:18:07 +0200 (IST) In-reply-to: <4B2BB21A.8050709@swipnet.se> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:118730 Archived-At: > Date: Fri, 18 Dec 2009 17:47:22 +0100 > From: Jan_Dj=E4rv > Cc: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org >=20 > Sure, but for each redisplay there is a lot of updating of other st= uff, that=20 > really doesn't need updating, like toll bars, menus and faces. If you know that they don't need to be updated, sure. But how do you know that scroll bars and menus don't need to be updated? E.g., for menus, we have menu items whose sensitivity is dynamically computed--how would you know in advance whether the conditions for that changed or not? > Redisplay is one thing, I'm not talking about that. Rader the real= ization and=20 > merging of faces that happens when redisplay is to be done. Any new text that is being displayed, i.e. text that was not on the screen during the previous redisplay, needs its faces to be computed and merged. If the text on the screen did not change, Emacs avoids redisplay almost entirely. If most of the text didn't change, only the new or modified text is rendered, at least in the most frequent cases. > Hmm, faces are recomputed all the time. If I start emacs like so: > % ./emacs -Q ../etc/tutorials/TUTORIAL.ja >=20 > Emacs does 102 calls to merge_face_vectors. This may be needed, I = haven't=20 > looked at this in detail. Remember: each charset can potentially use a different font, i.e. a different face. But Emacs looks up any face it needs in the face cache, before it decides to realize a new face. > What is strange though, is that if I scroll to the bottom of the bu= ffer,=20 > another 62 calls to merge_face_vectors are done even if no face has= changed. Did you try to see where are those 62 calls done?