From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Deffering redisplay in COMINT Date: Wed, 16 Jan 2013 09:39:33 -0500 Message-ID: References: <1354842513.76326.YahooMailNeo@web160901.mail.bf1.yahoo.com> <87obhi1j85.fsf@gmail.com> <1357459792.82082.YahooMailNeo@web160901.mail.bf1.yahoo.com> <1357915224.58763.YahooMailNeo@web160903.mail.bf1.yahoo.com> <1358064889.40573.YahooMailNeo@web160906.mail.bf1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358347184 6284 80.91.229.3 (16 Jan 2013 14:39:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jan 2013 14:39:44 +0000 (UTC) Cc: Vitalie Spinu , Emacs Devel To: Michael Mauger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 16 15:40:01 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TvU9o-00086L-GT for ged-emacs-devel@m.gmane.org; Wed, 16 Jan 2013 15:40:00 +0100 Original-Received: from localhost ([::1]:55831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvU9X-00058L-TQ for ged-emacs-devel@m.gmane.org; Wed, 16 Jan 2013 09:39:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvU9R-00053g-28 for emacs-devel@gnu.org; Wed, 16 Jan 2013 09:39:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvU9P-0002s3-Km for emacs-devel@gnu.org; Wed, 16 Jan 2013 09:39:36 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvU9P-0002rk-Er for emacs-devel@gnu.org; Wed, 16 Jan 2013 09:39:35 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r0GEdS0V006470; Wed, 16 Jan 2013 09:39:28 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id C34ACB4368; Wed, 16 Jan 2013 09:39:33 -0500 (EST) In-Reply-To: <1358064889.40573.YahooMailNeo@web160906.mail.bf1.yahoo.com> (Michael Mauger's message of "Sun, 13 Jan 2013 00:14:49 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4463=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4463> : streams <890324> : uri <1320290> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156421 Archived-At: > I ran several different configurations trying to identify important > criteria related to the display of this large block of text. > Display | GUI/X | Text/NW| > Truncate-lines | nil | t | nil | t| > ---Filter--- | ----- | ----- | ----- | -----| > BASE | 3:43 | 5:51 | 0:16 | 4:20 | > SS | 3:42 | 3:06 | 0:12 | 2:04 | > HSC | N/A | 0:07 | N/A | 0:04 | >From your tests, it seems clear that the problem is always redisplay time, which is why the extra work of HSC pays off. I think I can understand the difference between truncate and non-truncate on a tty (the amount of buffer text redisplay has to consider (i.e. (- (window-end) (window-start))) when refreshing the display is larger (proportional to the line lengths) than with wrap-around). But I don't understand why we don't see the same impact in the GUI case. IOW I really don't understand the "3:42" of SS+GUI with truncate-lines==nil. I'd expect it to be *much* lower (like 0:20 or so). Maybe we could speed it up the 2:04 case with a redisplay optimization that skips more quickly over the truncated part of the lines (special casing the "easy common case where there's no before/after-string, no `display' property, ..."). You could try and tweak the SS code further to reduce the number of redisplays. E.g. not only you "wait for a complete line" but you also "wait for the next second" so the buffer is only redisplayed once a second. Or you could try to do something halfway between SS and HSC: instead of keeping the non-displayed part of lines in a separate buffer (as in HSC), you do insert them (as in SS) but with an `invisible' text-property set to t so that the redisplay can (hopefully) skip over it very quickly. Stefan