emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Rainer Stengele <rainer.stengele@diplan.de>
Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org,
	nicholas.dokos@hp.com, ucecesf@ucl.ac.uk,
	"Sébastien Vauban"
	<public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@plane.gmane.org>
Subject: Re: moving in the agenda view is slow: solved!
Date: Wed, 1 Dec 2010 16:19:49 +0100	[thread overview]
Message-ID: <788F82CD-295C-43D1-A262-CBBB4318C791@gmail.com> (raw)
In-Reply-To: <4CF6658D.6050408@diplan.de>





On Dec 1, 2010, at 4:11 PM, Rainer Stengele wrote:

> 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.

I guess this could be modified to use an idle timer, so that the  
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

  reply	other threads:[~2010-12-01 15:21 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 16:26 moving in the agenda view is slow Rainer Stengele
2010-11-26 16:46 ` Carsten Dominik
2010-11-26 18:20   ` org-mode gnus integration across two machines when using nnimap Tommy Kelly
2010-11-26 18:35     ` Dan Christensen
2010-11-26 18:53       ` Tommy Kelly
2010-11-26 19:40         ` Dan Christensen
2010-12-14 23:07           ` Ted Zlatanov
2010-12-01 18:41     ` e20100633
2010-12-01 22:55       ` [Orgmode] " Eric S Fraga
2010-12-01 23:44         ` e20100633
2010-12-02  1:32         ` Bernt Hansen
2010-12-02  7:24           ` e20100633
2010-12-02  1:55         ` Greg Troxel
2010-12-02  2:58           ` Matt Lundin
2010-11-26 20:15 ` moving in the agenda view is slow Martin Stemplinger
2010-11-26 21:28   ` Markus Heller
2010-11-27 11:31     ` Rainer Stengele
2010-11-26 23:04 ` Eric S Fraga
2010-11-26 23:08   ` Carsten Dominik
2010-11-27  2:53   ` Nick Dokos
2010-11-27  7:09     ` Manuel Hermenegildo
2010-11-27 11:22       ` Rainer Stengele
2010-11-27 11:21     ` Rainer Stengele
2010-11-27 17:00       ` Nick Dokos
2010-11-27 18:25         ` Rainer Stengele
2010-11-27 19:23           ` Nick Dokos
2010-11-27 21:11             ` Rainer Stengele
2010-11-28  0:30               ` Nick Dokos
2010-11-28 18:38                 ` Rainer Stengele
2010-11-28 20:01                   ` Nick Dokos
2010-11-28 20:17                     ` Eric S Fraga
2010-11-28 22:11                       ` Nick Dokos
2010-11-30 12:28                       ` Eric S Fraga
2010-11-28 21:41                     ` Rainer Stengele
2010-12-15 11:47                     ` Eric S Fraga
2010-11-28 17:37               ` Eric S Fraga
2010-11-28 19:29                 ` Nick Dokos
2010-11-28 19:40                   ` Rainer Stengele
2010-11-28 21:32                     ` Nick Dokos
2010-11-28 22:12                       ` Eric S Fraga
2010-11-28 22:31                         ` Nick Dokos
2010-11-29  8:53                           ` Rainer Stengele
2010-11-29 10:51                       ` Rainer Stengele
2010-11-29 15:56                         ` Nick Dokos
2010-11-29 16:15                         ` Sébastien Vauban
2010-11-30 12:30                           ` Eric S Fraga
2010-12-01 14:18                             ` Carsten Dominik
2010-12-01 15:11                           ` moving in the agenda view is slow: solved! Rainer Stengele
2010-12-01 15:19                             ` Carsten Dominik [this message]
2010-12-01 17:30                             ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=788F82CD-295C-43D1-A262-CBBB4318C791@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=nicholas.dokos@hp.com \
    --cc=public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org \
    --cc=public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@plane.gmane.org \
    --cc=rainer.stengele@diplan.de \
    --cc=ucecesf@ucl.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).