From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: grischka Newsgroups: gmane.emacs.devel Subject: Re: redisplay system of emacs Date: Tue, 16 Feb 2010 20:20:06 +0100 Message-ID: <4B7AEFE6.4000305@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1266348449 15994 80.91.229.12 (16 Feb 2010 19:27:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Feb 2010 19:27:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 16 20:27:26 2010 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.69) (envelope-from ) id 1NhT4t-0002P5-9F for ged-emacs-devel@m.gmane.org; Tue, 16 Feb 2010 20:27:23 +0100 Original-Received: from localhost ([127.0.0.1]:47953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhT4s-0004uF-GD for ged-emacs-devel@m.gmane.org; Tue, 16 Feb 2010 14:27:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NhT4n-0004so-Hm for emacs-devel@gnu.org; Tue, 16 Feb 2010 14:27:17 -0500 Original-Received: from [140.186.70.92] (port=40057 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhT4l-0004pS-92 for emacs-devel@gnu.org; Tue, 16 Feb 2010 14:27:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NhT4k-00084Y-Au for emacs-devel@gnu.org; Tue, 16 Feb 2010 14:27:15 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]:35636) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NhT4j-00084C-CV for emacs-devel@gnu.org; Tue, 16 Feb 2010 14:27:14 -0500 Original-Received: (qmail invoked by alias); 16 Feb 2010 19:20:26 -0000 Original-Received: from 1Cust193.tnt6.ber2.deu.da.uu.net (EHLO [149.225.88.193]) [149.225.88.193] by mail.gmx.net (mp071) with SMTP; 16 Feb 2010 20:20:26 +0100 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX189YiddoWs9en7AXnXYkEZHMpOVqG9uacRHvH3tAf sdR1F3ywVLjltY User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-References: 35766.130.55.118.19.1266338417.squirrel@webmail.lanl.gov X-Y-GMX-Trusted: 0 X-FuHaFi: 0.69999999999999996 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:121148 Archived-At: >> Redisplay_internal does lots and lots of computations to detect which part >> of the buffer should be redisplayed at a given moment. All these >> computations can be avoided using a system of subwindows (1 for every >> char). > > Those computations are complicated because the buffer contents (or window > width, or scroll amount, or...) might have changed, not just because the > window might have been damaged in some complicated fashion. It's not _that_complicated. Basically it just draws the new screen to memory, then compares it with the current screen and then updates the differences. And actually it works nicely and fast, just maybe slightly over-designed in cases. (For example changing "bazfoobar" to "baz,foobar" would output ",f" and "obar" and thus reuse the originally second "o" for the new first one. One might think that drawing one additional "o" could be faster than two XDrawString, but so what). Whether the code could be written to be easier to understand is a different question but who has time for cleanups anyway. --- grischka