From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: moving in the agenda view is slow: solved! Date: Wed, 01 Dec 2010 16:11:09 +0100 Message-ID: <4CF6658D.6050408@diplan.de> References: <877hfzbsaj.fsf@pinto.chemeng.ucl.ac.uk> <32269.1290826390@gamaville.dokosmarshall.org> <4CF0E9D0.3010302@diplan.de> <589.1290877232@gamaville.dokosmarshall.org> <4CF14D17.1010905@online.de> <11315.1290885811@gamaville.dokosmarshall.org> <4CF1740B.6030405@online.de> <87pqtp73jw.fsf@ucl.ac.uk> <25801.1290972566@gamaville.dokosmarshall.org> <4CF2B010.9040904@diplan.de> <3201.1290979966@gamaville.dokosmarshall.org> <4CF385BD.3010101@online.de> <80lj4cqf7a.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=53985 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNoLE-0003c7-TD for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 10:11:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNoLD-0008EK-Kd for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 10:11:32 -0500 Received: from lo.gmane.org ([80.91.229.12]:56531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNoLD-0008Dn-9O for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 10:11:31 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PNoLC-0003K7-7L for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 16:11:30 +0100 Received: from 212.34.176.74 ([212.34.176.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Dec 2010 16:11:30 +0100 Received: from rainer.stengele by 212.34.176.74 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Dec 2010 16:11:30 +0100 In-Reply-To: <80lj4cqf7a.fsf@missioncriticalit.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: ucecesf@ucl.ac.uk, Carsten Dominik , nicholas.dokos@hp.com, public-emacs-orgmode-mXXj517/zsQ@lo.gmane.org Am 29.11.2010 17:15, schrieb Sébastien Vauban: > Hi Rainer, > > Rainer Stengele wrote: >> after disabling the showing of the outline path in agenda views: >> >> line-move 430 0.1890000000 0.0004395348 >> line-move-1 430 0.1730000000 0.0004023255 >> org-agenda-previous-line 214 0.1560000000 0.0007289719 >> org-agenda-next-line 216 0.095 0.0004398148 >> next-line 216 0.048 0.0002222222 >> org-agenda-do-context-action 430 0.047 0.0001093023 >> org-detach-overlay 431 0.015 3.48...e-005 >> org-unhighlight 431 0.015 3.48...e-005 >> line-move-partial 430 0.0 0.0 >> org-agenda-post-command-hook 431 0.0 0.0 >> org-get-at-bol 430 0.0 0.0 >> >> scrolling with "n" and "p" runs smoothly now! Sigh! That means the slowness >> is connected to my .emacs and org settings!? I'am afraid I have to go >> through all the settings and find the culprit. > > What do you exactly mean by: "disabling the showing of the outline path in agenda > views"? > > Best regards, > Seb > Hi Sebastian I meant setting org-agenda-show-outline-path to nil. ----------------------------------------------------- Now the more intersting news. Reading through my .emacs I found and removed the 2 reasons for the slowness! 1. smooth-scolling.el (from http://www.emacswiki.org/emacs/SmoothScrolling) The file includes this: #+BEGIN_SRC emacs-lisp (defadvice previous-line (after smooth-scroll-down (&optional arg try-vscroll) activate) "Scroll down smoothly if cursor is within `smooth-scroll-margin' lines of the top of the window." (and ;; Only scroll down if there is buffer above the start of the window. (> (window-start) (buffer-end -1)) (let ((lines-from-window-top (smooth-scroll-lines-from-window-top))) (and ;; Only scroll down if we're within the top margin (<= lines-from-window-top smooth-scroll-margin) ;; Only scroll down if we're in the top half of the window (<= lines-from-window-top ;; N.B. `window-height' includes modeline, so if it returned 21, ;; that would mean exactly 10 lines in the top half and 10 in ;; the bottom. 22 (or any even number) means there's one in the ;; middle. In both cases the following expression will ;; yield 10: (/ (1- (window-height)) 2)) (save-excursion (scroll-down (1+ (- smooth-scroll-margin lines-from-window-top)))))))) (defadvice next-line (after smooth-scroll-up (&optional arg try-vscroll) activate) "Scroll up smoothly if cursor is within `smooth-scroll-margin' lines of the bottom of the window." (and ;; Only scroll up if there is buffer below the end of the window. (< (window-end) (buffer-end 1)) (let ((lines-from-window-bottom (smooth-scroll-lines-from-window-bottom))) (and ;; Only scroll up if we're within the bottom margin (<= lines-from-window-bottom smooth-scroll-margin) ;; Only scroll up if we're in the bottom half of the window. (<= lines-from-window-bottom ;; See above notes on `window-height'. (/ (1- (window-height)) 2)) (save-excursion (scroll-up (1+ (- smooth-scroll-margin lines-from-window-bottom)))))))) ;;;_ + provide (provide 'smooth-scrolling) #+END_SRC 2. (add-hook 'org-agenda-mode-hook 'hl-line-mode) ----------------------------------------------------- Switching off both features brings back immediate scrolling. I do miss the features of smooth-scrolling and hl-line but it is not worth the performance penalty. Thanks to all for considering and helping. What a relieve to be able to again scroll fast in the agenda ... Best, Rainer