Re: [O] Performance problem when switching agenda views - need for cache?

2011-07-16 Thread Bastien
Hi Rainer,

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

 so yes - the main part of the time is taken by the big org file. Still
 5 seconds is not a keypress ...  And of course I will need a certain
 part of the excluded file. So going into any kind of caching might
 speed up things quite a bit.

Yes.

Sorry to read about such performance problems (again).

One thing I've used to speed up my own setup is to reduce the scope 
of `org-agenda-get-day-entries' by restricting agenda view with

  (org-agenda-entry-types '(:scheduled))

where it makes sense.  Otherwise `org-agenda-get-day-entries' can
loop over too many possibilities.

Keep us informed of any further analysis, progress.

Thanks!

-- 
 Bastien



[O] Performance problem when switching agenda views - need for cache?

2011-07-15 Thread Rainer Stengele
Dear all,

let me show some times I clocked using my precious org system.

Many a times I look at my weekly agenda view, working on the items of today and 
looking back over the weekdays to
quickly find todos I have to to add further notes and clock times.

Now, sometimes I do not find the right todo in the weekly view, so I activate 
the list of all open todos
in order to find the appropriate one.

This process, switching to all todos and back to weekly agenda takes about 
18 (!) seconds netto.
This is a lot! It psychologically prevents me to use the org system as I should 
and would like to.
I already tried to fix my weekly agenda view in a separate frame and call the 
all todo agenda in another frame,
just to go back to the first frame and continue to work there.
This does not seem to work (agenda is updated everywhere). If it would work it 
would just be something like a cache mode.

How about you orgers out there? Do you have long waiting times and therefore 
usability downsides?

org-agenda2   
17.6248.812
org-agenda-get-day-entries64  
13.61000  0.2126562500
org-agenda-run-series 1   
11.81211.812
org-agenda-list   1   
10.92110.921
org-let2  1   
10.92110.921
org-agenda-get-scheduled  56  7.284 
0.1300714285
org-todo-list 1   5.281 
5.281
org-agenda-get-todos  8   3.594 
0.44925
org-end-of-subtree3058
3.289000  0.0010755395
org-get-tags-at   347 
3.056000  0.0088069164
org-back-to-heading   10515   
2.864000  0.0002723728
org-up-heading-safe   1607
2.807000  0.0017467330
org-get-todo-state50852.227 
0.0004379547
org-prepare-agenda3   1.704 
0.568
org-prepare-agenda-buffers2   
1.579000  0.789500
org-agenda-get-progress   56  1.106 
0.01975
org-format-agenda-item350 
1.016000  0.0029028571
org-let   2   0.891 
0.4455
org-agenda-skip   7744
0.731000  9.43...e-005
org-agenda-get-deadlines  56  
0.686999  0.0122678571
org-finalize-agenda-entries   6   0.686 
0.114333
org-agenda-get-restriction-and-command1   0.531 
0.531
org-refresh-category-properties   16  
0.471000  0.0294375000
org-agenda-highlight-todo 350 0.437 
0.0012485714
org-agenda-get-timestamps 56  
0.407999  0.0072857142
org-outline-level 5925
0.313000  5.28...e-005
org-finalize-agenda   3   
0.312000  0.104000
org-time-string-to-absolute   4780
0.264000  5.52...e-005
org-get-effort348 
0.236000  0.0006781609
org-entry-get 348 
0.236000  0.0006781609
org-agenda-get-sexps  56  
0.221000  0.0039464285
org-get-priority  288 
0.203000  0.0007048611
org-check-agenda-file 80  
0.202000  0.002525
org-agenda-get-blocks 56  0.202 
0.0036071428
org-fontify-priorities2   0.187 
0.0935
org-downcase-keep-props   379 
0.171000  0.0004511873
org-get-entries-from-diary7   
0.157000  0.0224285714
org-on-heading-p  540 
0.157000  0.0002907407
org-get-property-block348 
0.157000  0.0004511494
org-agenda-skip-eval  10608   0.157 
   

Re: [O] Performance problem when switching agenda views - need for cache?

2011-07-15 Thread Memnon Anon
Hi Rainer, 

Sorry, I can not really comment/help with anything.
Just curious:

Rainer Stengele rainer.steng...@diplan.de writes:
 This process, switching to all todos and back to weekly agenda
 takes about 18 (!) seconds netto. This is a lot!

a) How many files are in your agenda file list?
b) How many all todos do you have?

18 seconds is a lot, indeed.
With my 512 megs RAM, 1.2 Mhz PIII Laptop, I do heavy and frequent
archiving, but preparing for exams, the amount of data will rise, soon.

Memnon a bit worried Anon




Re: [O] Performance problem when switching agenda views - need for cache?

2011-07-15 Thread Rainer Stengele
Am 15.07.2011 18:00, schrieb Memnon Anon:
 Hi Rainer, 
 
 Sorry, I can not really comment/help with anything.
 Just curious:
 
 Rainer Stengele rainer.steng...@diplan.de writes:
 This process, switching to all todos and back to weekly agenda
 takes about 18 (!) seconds netto. This is a lot!
 
 a) How many files are in your agenda file list?
 b) How many all todos do you have?
 
 18 seconds is a lot, indeed.
 With my 512 megs RAM, 1.2 Mhz PIII Laptop, I do heavy and frequent
 archiving, but preparing for exams, the amount of data will rise, soon.
 
 Memnon a bit worried Anon
 
 
 
Hi Memnon Anon,

I have 8 org-agenda files. Doing a wc word count on them gives me:

199 953   10169 f1.org
   4105   32563  257460 f2.org
6344667   35699 f3..org
  21567  169446 1524359 f4.org
   2413   19708  137255 f5.org
   6095   44852  376551 f6.org
6014994   53794 f7.org
6874601   37535 f8.org
  36301  281784 2432822 total

(newline, word, byte - count)
Is that a lot?


Another thing: here at home running a Linux machine slower than my machine at 
work gives me about
half the needed time. But still - 9 seconds is eternity when you want to 
continue to type.

Thanks,
Rainer


org-agenda2   
8.605063  4.302531
org-agenda-get-day-entries64  
6.801424  0.1062722500
org-agenda-run-series 1   
5.936252  5.936252
org-let2  1   
5.423472  5.423472
org-agenda-list   1   
5.423455  5.423455
org-agenda-get-scheduled  56  
3.757082  0.0670907678
org-todo-list 1   
2.412072  2.412072
org-end-of-subtree3058
1.881657  0.0006153227
org-back-to-heading   10468   
1.617533  0.0001545216
org-agenda-get-todos  8   
1.460044  0.1825055000
org-get-todo-state5082
1.283380  0.0002525344
org-get-tags-at   340 
1.094223  0.0032183029
org-up-heading-safe   1577
1.043081  0.0006614343
org-prepare-agenda3   
1.02636   0.34212
org-prepare-agenda-buffers2   
0.94225   0.471125
org-agenda-get-deadlines  56  
0.525749  0.0093883750
org-agenda-skip   7745
0.525092  6.779...e-05
org-let   2   
0.512741  0.2563705
org-agenda-get-timestamps 56  
0.428551  0.0076526964
org-refresh-category-properties   16  
0.36568   0.022855
org-agenda-get-progress   56  
0.330577  0.0059031785
org-finalize-agenda-entries   6   
0.313683  0.0522805
org-agenda-get-restriction-and-command1   
0.256535  0.256535
org-agenda-highlight-todo 344 
0.201964  0.0005871046
org-agenda-get-blocks 56  
0.174013  0.0031073928
org-time-string-to-absolute   4788
0.152420  3.183...e-05
org-add-props 1392
0.146396  0.0001051695
org-format-agenda-item344 
0.136612  0.0003971279
org-agenda-get-sexps  56  
0.116870  0.0020869642
org-outline-level 5872
0.113573  1.934...e-05
org-get-effort341 
0.092047  0.0002699325
org-entry-get 341 
0.089899  0.0002636334
org-entries-lessp 1623
0.088347  5.443...e-05
org-on-heading-p  540 
0.075482  0.0001397814
org-get-wdays 175 
0.073221  0.0004184114
org-get-priority  277 
0.062145  0.0002243537
org-at-date-range-p   268 
0.058436  0.0002180447
org-get-property-block  

Re: [O] Performance problem when switching agenda views - need for cache?

2011-07-15 Thread Nick Dokos
Rainer Stengele rainer.steng...@diplan.de wrote:


 Many a times I look at my weekly agenda view, working on the items of
 today and looking back over the weekdays to quickly find todos I have
 to to add further notes and clock times.
 
 Now, sometimes I do not find the right todo in the weekly view, so I
 activate the list of all open todos in order to find the appropriate
 one.
 
 This process, switching to all todos and back to weekly agenda
 takes about 18 (!) seconds netto.
 ...
 
 org-agenda2   
 17.6248.812
 org-agenda-get-day-entries64  
 13.61000  0.2126562500

Clearly, the 64 calls to org-agenda-get-day-entries hurt: a cursory look shows

,
| (while (setq d (pop day-numbers))
|   ...
|   (setq files thefiles
|   rtnall nil)
|   (while (setq file (pop files))
|...
| (setq rtn (apply 'org-agenda-get-day-entries
|  file date
|  org-agenda-entry-types)
|...
`

so it loops over all the days and for each day it loops over all the
files (7 days * 8 files = 56 times in org-agenda-list) - it only loops
over the 8 files for a given date in org-todo-list. So your normal
weekly agenda should take about 11 seconds or so (56/64 * 13) -
does it? If so, that's already too much.

Anything you can do to reduce the burden will help:
 
o reducing the number of days - nah
o reducing the number of files - maybe 
o reducing the size of each file - yes!

particularly this one:

  21567  169446 1524359 f4.org

which is 5x bigger than any of the others. You might just try leaving out
of the agenda file list, just to see what effect it has.

 org-agenda-run-series 1   
 11.81211.812

Another thing that makes a difference is your
org-agenda-custom-commands: afaict, this function is only called if
org-agenda-custom-commands has an entry with a series of commands
associated with it: the function runs overs the series of commands. I
could try to deduce/guess what's in there, but it would be simpler if
you just tell us :-) In any case, that's also a time hog.

 org-agenda-list   1   
 10.92110.921
 org-let2  1   
 10.92110.921
 org-agenda-get-scheduled  56  
 7.284 0.1300714285
 org-todo-list 1   
 5.281 5.281
 org-agenda-get-todos  8   
 3.594 0.44925
 ...

Nick




Re: [O] Performance problem when switching agenda views - need for cache?

2011-07-15 Thread Rainer Stengele
Am 15.07.2011 22:10, schrieb Nick Dokos:
 Rainer Stengele rainer.steng...@diplan.de wrote:
 
 
 Many a times I look at my weekly agenda view, working on the items of
 today and looking back over the weekdays to quickly find todos I have
 to to add further notes and clock times.

 Now, sometimes I do not find the right todo in the weekly view, so I
 activate the list of all open todos in order to find the appropriate
 one.

 This process, switching to all todos and back to weekly agenda
 takes about 18 (!) seconds netto.
 ...

 org-agenda2   
 17.6248.812
 org-agenda-get-day-entries64  
 13.61000  0.2126562500
 
 Clearly, the 64 calls to org-agenda-get-day-entries hurt: a cursory look shows
 
 ,
 | (while (setq d (pop day-numbers))
 |   ...
 |   (setq files thefiles
 | rtnall nil)
 |   (while (setq file (pop files))
 |...
 |   (setq rtn (apply 'org-agenda-get-day-entries
 |file date
 |org-agenda-entry-types)
 |...
 `
 
 so it loops over all the days and for each day it loops over all the
 files (7 days * 8 files = 56 times in org-agenda-list) - it only loops
 over the 8 files for a given date in org-todo-list. So your normal
 weekly agenda should take about 11 seconds or so (56/64 * 13) -
 does it? If so, that's already too much.
 
 Anything you can do to reduce the burden will help:
  
 o reducing the number of days - nah
 o reducing the number of files - maybe 
 o reducing the size of each file - yes!
 
 particularly this one:
 
   21567  169446 1524359 f4.org
 
 which is 5x bigger than any of the others. You might just try leaving out
 of the agenda file list, just to see what effect it has.
 
 org-agenda-run-series 1   
 11.81211.812
 
 Another thing that makes a difference is your
 org-agenda-custom-commands: afaict, this function is only called if
 org-agenda-custom-commands has an entry with a series of commands
 associated with it: the function runs overs the series of commands. I
 could try to deduce/guess what's in there, but it would be simpler if
 you just tell us :-) In any case, that's also a time hog.
 
 org-agenda-list   1   
 10.92110.921
 org-let2  1   
 10.92110.921
 org-agenda-get-scheduled  56  
 7.284 0.1300714285
 org-todo-list 1   
 5.281 5.281
 org-agenda-get-todos  8   
 3.594 0.44925
 ...
 
 Nick
 
 
 
Nick, thanks for your analysis,
my custom agenda command for the weekly agenda is this:

...
(07 agenda no todos sorted prio up - 7 days
 ((agenda .. agenda
  (
   (org-agenda-ndays 7)
   (org-agenda-start-with-log-mode t)
   (org-agenda-overriding-header Weekly Agenda
 ((org-agenda-sorting-strategy '(time-up priority-down todo-state-up
...

the todo list ist default C-c a t
It will not be easy to cut down my org files to smaller sizes.

Best,

- Rainer



Re: [O] Performance problem when switching agenda views - need for cache?

2011-07-15 Thread Nick Dokos
Rainer Stengele rainer.steng...@online.de wrote:

 It will not be easy to cut down my org files to smaller sizes.
 

If you could try just eliminating the big file from org-agenda-files
temporarily, try the commands to see if it does indeed make a
difference, and then add it back on, that would help steer us in the
right direction, I think. You can use C-c ] and C-c [ while visiting
the file to delete it from the list and add it back on (although that
might mess up the order).

Nick



Re: [O] Performance problem when switching agenda views - need for cache?

2011-07-15 Thread Rainer Stengele
Am 16.07.2011 01:15, schrieb Nick Dokos:
 Rainer Stengele rainer.steng...@online.de wrote:
 
 It will not be easy to cut down my org files to smaller sizes.

 
 If you could try just eliminating the big file from org-agenda-files
 temporarily, try the commands to see if it does indeed make a
 difference, and then add it back on, that would help steer us in the
 right direction, I think. You can use C-c ] and C-c [ while visiting
 the file to delete it from the list and add it back on (although that
 might mess up the order).
 
 Nick
 
 
OK, removeing the big file from the agenda file list results in (only weekly 
view):

org-agenda1   
5.011847  5.011847
org-agenda-run-series 1   
5.01176   5.01176
org-let2  1   
4.51891   4.51891
org-agenda-list   1   
4.518894  4.518894
org-agenda-get-day-entries56  
4.331017  0.0773396071
org-agenda-get-scheduled  56  
3.074571  0.0549030535
org-back-to-heading   8039
1.278002  0.0001589753
org-get-todo-state4834
1.138154  0.0002354476
org-end-of-subtree2745
0.920293  0.0003352615
org-let   2   
0.492812  0.246406
org-prepare-agenda2   
0.479444  0.239722
org-prepare-agenda-buffers1   
0.375417  0.375417
org-agenda-get-progress   56  
0.344603  0.0061536250
org-time-string-to-absolute   4816
0.342442  7.110...e-05
org-agenda-get-deadlines  56  
0.326798  0.0058356785
org-agenda-get-timestamps 56  
0.299163  0.0053421964
org-agenda-skip   7493
0.244286  3.260...e-05
org-parse-time-string 5124
0.243559  4.753...e-05
org-get-tags-at   65  
0.168317  0.0025894923
org-agenda-get-blocks 56  
0.162876  0.0029085
org-up-heading-safe   294 
0.161177  0.0005482244
org-refresh-category-properties   8   
0.139898  0.01748725
org-agenda-get-sexps  56  
0.114816  0.0020503035
org-finalize-agenda-entries   6   
0.113231  0.0188718333
org-agenda-highlight-todo 70  
0.105273  0.0015039
org-at-date-range-p   269 
0.039721  0.0001476654
org-get-entries-from-diary7   
0.03710.0053
org-format-agenda-item70  
0.02979   0.0004255714
org-outline-level 3268
0.027143  8.305...e-06
org-on-heading-p  270 
0.026316  9.746...e-05
org-agenda-skip-eval  10114   
0.021681  2.143...e-06

so yes - the main part of the time is taken by the big org file. Still 5 
seconds is not a keypress ...
And of course I will need a certain part of the excluded file. So going into 
any kind of caching might speed
up things quite a bit.

Rainer