Re: [Orgmode] moving in the agenda view is slow

2010-11-27 Thread Rainer Stengele
Am 27.11.2010 03:53, schrieb Nick Dokos:
 Eric S Fraga ucec...@ucl.ac.uk wrote:

 Rainer Stengele rainer.steng...@diplan.de writes:

 Hi all,

 I am struggling more and more with slowness in my agenda view.  Moving
 from line to line with n and p is slow.  Pressing the n key for 2
 seconds will result in the cursor not following every keypress but
 jumping down after 2 or 3 seconds.
 I'll add that I have observed this the past week or so: there's a very
 noticeable pause between my hitting 'n', say, and the cursor moving down
 to the next line in a default agenda view (C-c a a).  My agenda files
 add up to less than 40k lines.  I've not done any investigation to see
 why things have slowed up recently but will start playing around...

 I don't have this problem at all (perhaps because my agenda files are
 puny at less than 5K lines total), but I obtained a profile[fn:1] and
 most of the time goes to font-lock stuff. Here are the top five:

 font-lock-fontify-region  11953   
 4.586574  0.0003837173
 font-lock-default-fontify-region  11953   
 4.219105  0.0003529745
 font-lock-fontify-keywords-region 11953   
 2.885069  0.0002413677
 font-lock-extend-jit-lock-region-after-change 87462   
 1.440971  1.647...e-05
 org-agenda-list   1   
 0.461168  0.461168

 What does your profile look like?

 Thanks,
 Nick

 Footnotes:
 [fn:1] ... by doing

 M-x elp-instrument-package RET org RET
 C-c a a to get an agenda
 a dozen ns - N.B. I get instant response here: no delays.
 M-x elp-results

What I did:
open the agenda view

M-x elp-instrument-package RET org RET
several ns - delays are there - same on linux (V23.2.1) and windows emacs
M-x elp-results


org-agenda-next-line  79  
4.004141  0.0506853291
org-agenda-do-context-action  79  
0.001360  1.722...e-05
org-unhighlight   81  
0.000917  1.132...e-05
org-get-at-bol79  
0.000473  5.987...e-06
org-detach-overlay81  
0.000268  3.320...e-06
org-agenda-post-command-hook  81  
0.000244  3.024...e-06

strange, why do I not get more details?
another try: what I see here and feel when scrolling is that next-line is a 
lot slower than 
previous-line


org-agenda-next-line  35  
1.796858  0.0513388285
org-agenda-previous-line  83  
1.021646  0.012308
org-agenda-do-context-action  116 
0.002467  2.126...e-05
org-unhighlight   123 
0.001856  1.509...e-05
org-get-at-bol116 
0.001202  1.036...e-05
org-detach-overlay123 
0.000490  3.983...e-06
org-agenda-post-command-hook  123 
0.000394  3.203...e-06
font-lock-mode1   
3.4e-05   3.4e-05
font-lock-default-function1   8e-06 
8e-06


Rainer




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] moving in the agenda view is slow

2010-11-27 Thread Rainer Stengele
Am 27.11.2010 08:09, schrieb Manuel Hermenegildo:
 My impression is that it is indeed at least partially related to
 font-lock. I have also observed that (at least on a mac) it is much
 worse in emacs 23 than in emacs 22 (to the point where it has made me
 swicth back to emacs 22 to make org usable). A recent post suggested
 using 

 (setq font-lock-verbose nil)

 which does improve things (by avoiding printing some messages during
 font-lock), but it is still slow for me in emacs 23. My org files are
 15 or so, around 30K lines each. --Man

that didn't really change the slowness.
Thanks,

Rainer

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] moving in the agenda view is slow

2010-11-27 Thread Nick Dokos
Rainer Stengele rainer.steng...@diplan.de wrote:

 What I did:
 open the agenda view
 
 M-x elp-instrument-package RET org RET
 several ns - delays are there - same on linux (V23.2.1) and windows emacs
 M-x elp-results
 
 
 org-agenda-next-line  79  
 4.004141  0.0506853291
 org-agenda-do-context-action  79  
 0.001360  1.722...e-05
 org-unhighlight   81  
 0.000917  1.132...e-05
 org-get-at-bol79  
 0.000473  5.987...e-06
 org-detach-overlay81  
 0.000268  3.320...e-06
 org-agenda-post-command-hook  81  
 0.000244  3.024...e-06
 
 strange, why do I not get more details?

Why are there 79 calls to org-agenda-next-line? AFAIK, there should be
just one for each n pressed. Maybe do M-x elp-reset-all, then press
n, and M-x elp-results?

The thing is that org-agenda-next-line is very simple:

,
| (defun org-agenda-next-line ()
|   Move cursor to the next line, and show if follow mode is active.
|   (interactive)
|   (call-interactively 'next-line)
|   (org-agenda-do-context-action))
`

and the calls to org-agend-do-context-action don't amount to much, so
essentially all of the time must be spent in the (call-interactively
'next-line).

Maybe M-x elp-instrument-function RET next-line RET will give some
more clues.  I assume call-interactively cannot be instrumented by elp
since it's in C.

Nick


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] moving in the agenda view is slow

2010-11-26 Thread Carsten Dominik


On Nov 26, 2010, at 5:26 PM, Rainer Stengele wrote:


Hi all,

I am struggling more and more with slowness in my agenda view.
Moving from line to line with n and p is slow.
Pressing the n key for 2 seconds will result in the cursor not  
following every keypress but jumping down after 2 or 3 seconds.


I switched off all minor modes and found no improvements.
What is the agenda doing when I am moving from item to item?
Follow-mode is off.

I use about 10 org files with a total of 35.000 lines.
The slowness is true for customized agenda views as well as for  
default ones like C-a t (List of all todo entries).


Strange.

One way to find out is to turn on debug on quit, and then press C-g  
during the wait and see where it stops, in which function calls.




GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-11-04 on  
LENNART-69DE564 (patched)

Org-mode version 7.3 (release_7.3.157.ga98a)

Rainer




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] moving in the agenda view is slow

2010-11-26 Thread Martin Stemplinger
Hallo Rainer Stengele,

am 26.11.2010 schriebst Du:

 Hi all,

 I am struggling more and more with slowness in my agenda view.
 Moving from line to line with n and p is slow.
 Pressing the n key for 2 seconds will result in the cursor not following 
 every keypress
 but jumping down after 2 or 3 seconds.

 I switched off all minor modes and found no improvements.
 What is the agenda doing when I am moving from item to item?
 Follow-mode is off.

 I use about 10 org files with a total of 35.000 lines.
 The slowness is true for customized agenda views as well as for default ones 
 like C-a t
 (List of all todo entries).

 GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-11-04 on LENNART-69DE564 
 (patched)
 Org-mode version 7.3 (release_7.3.157.ga98a)

 Rainer

Maybe it's something completely different but I found org-mode to be
ridicilous slow when the org-files were under git version control. No
idea when this started and why it happened.  

HTH
Martin

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] moving in the agenda view is slow

2010-11-26 Thread Eric S Fraga
Rainer Stengele rainer.steng...@diplan.de writes:

 Hi all,

 I am struggling more and more with slowness in my agenda view.  Moving
 from line to line with n and p is slow.  Pressing the n key for 2
 seconds will result in the cursor not following every keypress but
 jumping down after 2 or 3 seconds.

I'll add that I have observed this the past week or so: there's a very
noticeable pause between my hitting 'n', say, and the cursor moving down
to the next line in a default agenda view (C-c a a).  My agenda files
add up to less than 40k lines.  I've not done any investigation to see
why things have slowed up recently but will start playing around...

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.99.g9db0.dirty)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] moving in the agenda view is slow

2010-11-26 Thread Carsten Dominik


On Nov 27, 2010, at 12:04 AM, Eric S Fraga wrote:


Rainer Stengele rainer.steng...@diplan.de writes:


Hi all,

I am struggling more and more with slowness in my agenda view.   
Moving

from line to line with n and p is slow.  Pressing the n key for 2
seconds will result in the cursor not following every keypress but
jumping down after 2 or 3 seconds.


I'll add that I have observed this the past week or so: there's a very
noticeable pause between my hitting 'n', say, and the cursor moving  
down

to the next line in a default agenda view (C-c a a).  My agenda files
add up to less than 40k lines.  I've not done any investigation to see
why things have slowed up recently but will start playing around...


Maybe bisect to identify a commit that caused this???

- Carsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] moving in the agenda view is slow

2010-11-26 Thread Nick Dokos
Eric S Fraga ucec...@ucl.ac.uk wrote:

 Rainer Stengele rainer.steng...@diplan.de writes:
 
  Hi all,
 
  I am struggling more and more with slowness in my agenda view.  Moving
  from line to line with n and p is slow.  Pressing the n key for 2
  seconds will result in the cursor not following every keypress but
  jumping down after 2 or 3 seconds.
 
 I'll add that I have observed this the past week or so: there's a very
 noticeable pause between my hitting 'n', say, and the cursor moving down
 to the next line in a default agenda view (C-c a a).  My agenda files
 add up to less than 40k lines.  I've not done any investigation to see
 why things have slowed up recently but will start playing around...
 

I don't have this problem at all (perhaps because my agenda files are
puny at less than 5K lines total), but I obtained a profile[fn:1] and
most of the time goes to font-lock stuff. Here are the top five:

font-lock-fontify-region  11953   
4.586574  0.0003837173
font-lock-default-fontify-region  11953   
4.219105  0.0003529745
font-lock-fontify-keywords-region 11953   
2.885069  0.0002413677
font-lock-extend-jit-lock-region-after-change 87462   
1.440971  1.647...e-05
org-agenda-list   1   
0.461168  0.461168

What does your profile look like?

Thanks,
Nick

Footnotes:
[fn:1] ... by doing

M-x elp-instrument-package RET org RET
C-c a a to get an agenda
a dozen ns - N.B. I get instant response here: no delays.
M-x elp-results

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] moving in the agenda view is slow

2010-11-26 Thread Manuel Hermenegildo

My impression is that it is indeed at least partially related to
font-lock. I have also observed that (at least on a mac) it is much
worse in emacs 23 than in emacs 22 (to the point where it has made me
swicth back to emacs 22 to make org usable). A recent post suggested
using 

(setq font-lock-verbose nil)

which does improve things (by avoiding printing some messages during
font-lock), but it is still slow for me in emacs 23. My org files are
15 or so, around 30K lines each. --Man

-- 
---
Manuel Hermenegildo 
---


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode