From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window Date: Fri, 13 Dec 2013 11:38:24 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1386952766 9990 80.91.229.3 (13 Dec 2013 16:39:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Dec 2013 16:39:26 +0000 (UTC) Cc: 16129@debbugs.gnu.org To: Anders Lindgren Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 13 17:39:31 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VrVlo-0003ST-2v for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Dec 2013 17:39:20 +0100 Original-Received: from localhost ([::1]:43486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrVln-00077G-Bt for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Dec 2013 11:39:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrVld-00076U-Qz for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2013 11:39:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrVlW-0005fP-DS for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2013 11:39:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrVlW-0005fL-AM for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2013 11:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VrVlV-0006Ki-KY for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2013 11:39:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Dec 2013 16:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16129-submit@debbugs.gnu.org id=B16129.138695271224309 (code B ref 16129); Fri, 13 Dec 2013 16:39:01 +0000 Original-Received: (at 16129) by debbugs.gnu.org; 13 Dec 2013 16:38:32 +0000 Original-Received: from localhost ([127.0.0.1]:48711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VrVl1-0006Jy-KU for submit@debbugs.gnu.org; Fri, 13 Dec 2013 11:38:31 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:34053) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VrVky-0006Jp-91 for 16129@debbugs.gnu.org; Fri, 13 Dec 2013 11:38:29 -0500 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.DIT.UMontreal.CA (8.14.1/8.14.1) with ESMTP id rBDGcPDu008351; Fri, 13 Dec 2013 11:38:26 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B7F43AE21D; Fri, 13 Dec 2013 11:38:24 -0500 (EST) In-Reply-To: (Anders Lindgren's message of "Fri, 13 Dec 2013 15:34:07 +0100") 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 RV4791=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4791> : inlines <321> : streams <1090245> : uri <1622897> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:81889 Archived-At: > I am the original author of follow-mode, so I can share one interesting > implementation detail. When the viewed buffer ends before the last window, > follow-mode tries to display this window without any content (by setting > the window start to point-max). Unfortunately, the Emacs display engine > always tries ensure that windows are not empty so it repositions it... So, > follow-mode hammers in its view of the world every chance it gets, > currrently in post-command hook and window-scroll-functions. Hmm.. so we have 2 things to do: 1- figure out why my patch slowed things down so much. 2- change follow-mode to use a different approach. Maybe a good way is to do the following: put window-point at point-max, and add an overlay on window-start...point-max that makes the text invisible (with a `window' property, so it's only invisible in that window). Of course, maybe that won't work either. But hooking everywhere doesn't sound like a good idea. -- Stefab