From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: moving in the agenda view is slow: solved! Date: Wed, 1 Dec 2010 16:19:49 +0100 Message-ID: <788F82CD-295C-43D1-A262-CBBB4318C791@gmail.com> 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> <4CF6658D.6050408@diplan.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=53247 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNoUJ-0002MW-Gh for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 10:21:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNoUF-0002vL-4e for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 10:20:55 -0500 Received: from plane.gmane.org ([80.91.229.3]:60176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNoUE-0002uW-Qh for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 10:20:51 -0500 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1PNoUD-0005vH-2t for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 16:20:49 +0100 In-Reply-To: <4CF6658D.6050408@diplan.de> 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: Rainer Stengele Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org, nicholas.dokos@hp.com, ucecesf@ucl.ac.uk, =?ISO-8859-1?Q?S=E9bastien_Vauban?= On Dec 1, 2010, at 4:11 PM, Rainer Stengele wrote: > Am 29.11.2010 17:15, schrieb S=E9bastien Vauban: >> Hi Rainer, >> >> Rainer Stengele wrote: >>> after disabling the showing of the outline path in agenda views: >>> >>> line-move =20 >>> 430 0.1890000000 0.0004395348 >>> line-move-1 =20 >>> 430 0.1730000000 0.0004023255 >>> org-agenda-previous-line =20 >>> 214 0.1560000000 0.0007289719 >>> org-agenda-next-line =20 >>> 216 0.095 0.0004398148 >>> next-line =20 >>> 216 0.048 0.0002222222 >>> org-agenda-do-context-action =20 >>> 430 0.047 0.0001093023 >>> org-detach-overlay =20 >>> 431 0.015 3.48...e-005 >>> org-unhighlight =20 >>> 431 0.015 3.48...e-005 >>> line-move-partial =20 >>> 430 0.0 0.0 >>> org-agenda-post-command-hook =20 >>> 431 0.0 0.0 >>> org-get-at-bol =20 >>> 430 0.0 0.0 >>> >>> scrolling with "n" and "p" runs smoothly now! Sigh! That means the =20= >>> slowness >>> is connected to my .emacs and org settings!? I'am afraid I have to =20= >>> go >>> through all the settings and find the culprit. >> >> What do you exactly mean by: "disabling the showing of the outline =20= >> 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 =20= > 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 =20 > 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 > (<=3D lines-from-window-top smooth-scroll-margin) > ;; Only scroll down if we're in the top half of the window > (<=3D lines-from-window-top > ;; N.B. `window-height' includes modeline, so if it =20 > 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 =20 > 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 > (<=3D lines-from-window-bottom smooth-scroll-margin) > ;; Only scroll up if we're in the bottom half of the window. > (<=3D 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 =20= > worth the > performance penalty. I guess this could be modified to use an idle timer, so that the =20 hightlighting will not be updated while keyboard input is in the queue. > > Thanks to all for considering and helping. Indeed, quite a hunt. Great thread. - Carsten=