From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gerald Wildgruber Newsgroups: gmane.emacs.devel Subject: Re: follow-mode: extremely slow in combination with org-mode Date: Sun, 17 Jun 2018 08:57:22 +0200 Message-ID: <877emx3not.fsf@tu-berlin.de> References: <87zhzvc9km.fsf@tu-berlin.de> <83r2l7yn52.fsf@gnu.org> <87y3fedgnq.fsf@tu-berlin.de> <838t7ezokb.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529218532 24961 195.159.176.226 (17 Jun 2018 06:55:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Jun 2018 06:55:32 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 17 08:55:28 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 1fURay-0006MD-05 for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 08:55:28 +0200 Original-Received: from localhost ([::1]:54049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fURd5-0002a4-25 for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 02:57:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fURcx-0002Zs-Ux for emacs-devel@gnu.org; Sun, 17 Jun 2018 02:57:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fURcx-0004CR-29 for emacs-devel@gnu.org; Sun, 17 Jun 2018 02:57:32 -0400 Original-Received: from exchange.tu-berlin.de ([130.149.7.70]:1309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fURct-0004Bd-52; Sun, 17 Jun 2018 02:57:27 -0400 Original-Received: from SPMA-02.tubit.win.tu-berlin.de (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 50FC635F67_B260654B; Sun, 17 Jun 2018 06:57:24 +0000 (GMT) Original-Received: from exchange.tu-berlin.de (exchange.tu-berlin.de [130.149.7.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "exchange.tu-berlin.de", Issuer "DFN-Verein Global Issuing CA" (not verified)) by SPMA-02.tubit.win.tu-berlin.de (Sophos Email Appliance) with ESMTPS id 253463367A_B260653F; Sun, 17 Jun 2018 06:57:23 +0000 (GMT) Original-Received: from corax (178.199.231.181) by ex-mbx-10.tubit.win.tu-berlin.de (130.149.6.164) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Sun, 17 Jun 2018 08:57:22 +0200 In-Reply-To: <838t7ezokb.fsf@gnu.org> X-ClientProxiedBy: EX-MBX-08.tubit.win.tu-berlin.de (130.149.6.159) To ex-mbx-10.tubit.win.tu-berlin.de (130.149.6.164) X-PMWin-Version: 4.0.1, Antivirus-Engine: 3.72.1, Antivirus-Data: 5.51 X-PureMessage: [Scanned] X-SASI-RCODE: 200 X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x [fuzzy] X-Received-From: 130.149.7.70 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:226399 Archived-At: On Sa, Jun 16 2018, Eli Zaretskii wrote: > 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? I repeated the profiling two times; the intermediate calls disappeared; I can't say what might have caused them; here is the result: - follow-post-command-hook 21938 71% - if 21938 71% - let 21938 71% - save-current-buffer 21938 71% - follow-adjust-window 21933 71% - if 21933 71% - progn 21933 71% - let 21906 71% - let* 21906 71% - progn 17609 57% - follow-windows-start-end 17606 57% - if 17606 57% - let 17603 57% - let 17603 57% - while 17603 57% - setq 17599 57% - cons 17599 57% - cons 17599 57% - cons 17599 57% - follow-calc-win-end 17591 57% - let* 17591 57% - if 9229 30% + let 1115 3% + pos-visible-in-window-p 26 0% posn-point 8350 27% + window-inside-pixel-edges 12 0% + follow-cache-valid-p 3 0% + follow-update-window-start 3 0% - if 4297 13% - follow-redisplay 3329 10% - let* 3329 10% - cond 2924 9% - follow-calculate-first-window-start-from-above 2924 9% - save-excursion 2924 9% - let 2924 9% - while 2924 9% - if 2924 9% - setq 2899 9% - follow-calc-win-start 2899 9% - while 2899 9% - let 2899 9% - setq 2896 9% - car 2896 9% - follow-calc-win-end 2896 9% - let* 2896 9% posn-point 1455 4% if 1441 4% set-window-start 3 0% + not 25 0% + let 169 0% + follow-calc-win-start 125 0% + follow-estimate-first-window-start 111 0% + let 598 1% + setq 364 1% + follow-avoid-tail-recenter 3 0% + and 3 0% + follow-avoid-tail-recenter 27 0% set-buffer 5 0% >> > 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? When I do a SHOW-ALL, my emacs frame split into those five windows connected by follow-mode show about 700 lines of (natural language) text. If COLLAPSED, it can be up to several thousand lines of text hidden under the org headings (typically two to ten thousand lines). Gerald. --------------------- Sent with mu4e