From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: follow-mode: extremely slow in combination with org-mode Date: Sat, 16 Jun 2018 19:25:08 +0300 Message-ID: <838t7ezokb.fsf@gnu.org> References: <87zhzvc9km.fsf@tu-berlin.de> <83r2l7yn52.fsf@gnu.org> <87y3fedgnq.fsf@tu-berlin.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1529166205 3032 195.159.176.226 (16 Jun 2018 16:23:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2018 16:23:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: Gerald Wildgruber Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 16 18:23:21 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUDyz-0000iL-8h for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2018 18:23:21 +0200 Original-Received: from localhost ([::1]:52100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUE16-00022E-3d for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2018 12:25:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUE0x-000226-Fn for emacs-devel@gnu.org; Sat, 16 Jun 2018 12:25:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUE0s-0007lY-L2 for emacs-devel@gnu.org; Sat, 16 Jun 2018 12:25:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUE0s-0007lM-3U; Sat, 16 Jun 2018 12:25:18 -0400 Original-Received: from [176.228.60.248] (port=3923 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fUE0r-0005ir-EP; Sat, 16 Jun 2018 12:25:17 -0400 In-reply-to: <87y3fedgnq.fsf@tu-berlin.de> (message from Gerald Wildgruber on Sat, 16 Jun 2018 15:06:49 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:226375 Archived-At: > From: Gerald Wildgruber > CC: > Date: Sat, 16 Jun 2018 15:06:49 +0200 > > > - follow-calc-win-start 103381 64% > - while 103381 64% > - let 103378 64% > - setq 103349 64% > - car 103349 64% > - follow-calc-win-end 103346 64% > - apply 103346 64% > - # 103329 64% > - apply 103322 64% > - # 103313 64% > - let* 103310 64% > posn-point 51699 32% > + if 51546 32% > + window-inside-pixel-edges 47 0% There's something here I don't understand. This profile says that follow-calc-win-end calls posn-point via two 'apply' calls, a byte-compiled function, and a lambda-function. But there's nothing like that in follow.el that I could see. Did you advise some functions in follow.el? If not, what are those intermediate calls? > > If you "show all" in the Org buffer, do the lags become significantly > > smaller? > > Yes, the difference is VERY significant; but I guess this is because > with collapsed headings, there is A LOT more text within the boundaries > of my frame, than with show-all. How much is "A LOT more"? How many physical lines do you have in typical single window in that Org buffer?