emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Performance problem when switching agenda views - need for cache?
@ 2011-07-15 14:49 Rainer Stengele
  2011-07-15 16:00 ` Memnon Anon
  2011-07-15 20:10 ` Nick Dokos
  0 siblings, 2 replies; 8+ messages in thread
From: Rainer Stengele @ 2011-07-15 14:49 UTC (permalink / raw)
  To: emacs-orgmode

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-agenda                                                    2           17.624        8.812
org-agenda-get-day-entries                                    64          13.610000000  0.2126562500
org-agenda-run-series                                         1           11.812        11.812
org-agenda-list                                               1           10.921        10.921
org-let2                                                      1           10.921        10.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-subtree                                            3058        3.2890000000  0.0010755395
org-get-tags-at                                               347         3.0560000000  0.0088069164
org-back-to-heading                                           10515       2.8640000000  0.0002723728
org-up-heading-safe                                           1607        2.8070000000  0.0017467330
org-get-todo-state                                            5085        2.227         0.0004379547
org-prepare-agenda                                            3           1.704         0.568
org-prepare-agenda-buffers                                    2           1.5790000000  0.7895000000
org-agenda-get-progress                                       56          1.106         0.01975
org-format-agenda-item                                        350         1.0160000000  0.0029028571
org-let                                                       2           0.891         0.4455
org-agenda-skip                                               7744        0.7310000000  9.43...e-005
org-agenda-get-deadlines                                      56          0.6869999999  0.0122678571
org-finalize-agenda-entries                                   6           0.686         0.1143333333
org-agenda-get-restriction-and-command                        1           0.531         0.531
org-refresh-category-properties                               16          0.4710000000  0.0294375000
org-agenda-highlight-todo                                     350         0.437         0.0012485714
org-agenda-get-timestamps                                     56          0.4079999999  0.0072857142
org-outline-level                                             5925        0.3130000000  5.28...e-005
org-finalize-agenda                                           3           0.3120000000  0.1040000000
org-time-string-to-absolute                                   4780        0.2640000000  5.52...e-005
org-get-effort                                                348         0.2360000000  0.0006781609
org-entry-get                                                 348         0.2360000000  0.0006781609
org-agenda-get-sexps                                          56          0.2210000000  0.0039464285
org-get-priority                                              288         0.2030000000  0.0007048611
org-check-agenda-file                                         80          0.2020000000  0.0025250000
org-agenda-get-blocks                                         56          0.202         0.0036071428
org-fontify-priorities                                        2           0.187         0.0935
org-downcase-keep-props                                       379         0.1710000000  0.0004511873
org-get-entries-from-diary                                    7           0.1570000000  0.0224285714
org-on-heading-p                                              540         0.1570000000  0.0002907407
org-get-property-block                                        348         0.1570000000  0.0004511494
org-agenda-skip-eval                                          10608       0.157         1.48...e-005
org-agenda-files                                              6           0.125         0.0208333333
org-agenda-align-tags                                         2           0.109         0.0545
org-at-date-range-p                                           279         0.0930000000  0.0003333333
org-before-first-heading-p                                    348         0.079         0.0002270114
org-parse-time-string                                         5088        0.078         1.53...e-005
org-agenda-mode                                               2           0.048         0.024
org-entries-lessp                                             1639        0.03          1.83...e-005
org-add-props                                                 1419        0.03          2.11...e-005
org-agenda-fix-displayed-tags                                 350         0.016         4.57...e-005
org-agenda-fontify-priorities                                 2           0.016         0.008
org-diary-sexp-entry                                          7           0.016         0.0022857142
org-find-base-buffer-visiting                                 80          0.015         0.0001875
org-get-agenda-file-buffer                                    80          0.015         0.0001875
org-closest-date                                              321         0.015         4.67...e-005
org-agenda-set-mode-name                                      2           0.0           0.0
org-date-to-gregorian                                         642         0.0           0.0
org-remove-uninherited-tags                                   603         0.0           0.0


Best,
- Rainer


my settings:

GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) from trunk 2011-02-16 on LENNART-69DE564 (patched)
Org-mode version 7.6 (release_7.6.88.gd1c9)


by the way:

it takes me

org-version                                                   1           5.438         5.438
org-agenda-span-name                                          5           0.0           0.0

to get to see the org version I use!!! Can't explain why. My PC is a Windows XP SP3, P5 3GHZ, 3GB RAM. Runs perfectly.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Performance problem when switching agenda views - need for cache?
  2011-07-15 14:49 Performance problem when switching agenda views - need for cache? Rainer Stengele
@ 2011-07-15 16:00 ` Memnon Anon
  2011-07-15 18:00   ` Rainer Stengele
  2011-07-15 20:10 ` Nick Dokos
  1 sibling, 1 reply; 8+ messages in thread
From: Memnon Anon @ 2011-07-15 16:00 UTC (permalink / raw)
  To: emacs-orgmode

Hi Rainer, 

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

Rainer Stengele <rainer.stengele@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Performance problem when switching agenda views - need for cache?
  2011-07-15 16:00 ` Memnon Anon
@ 2011-07-15 18:00   ` Rainer Stengele
  0 siblings, 0 replies; 8+ messages in thread
From: Rainer Stengele @ 2011-07-15 18:00 UTC (permalink / raw)
  Cc: emacs-orgmode

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.stengele@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
    634    4667   35699 f3..org
  21567  169446 1524359 f4.org
   2413   19708  137255 f5.org
   6095   44852  376551 f6.org
    601    4994   53794 f7.org
    687    4601   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-agenda                                                    2           8.6050639999  4.3025319999
org-agenda-get-day-entries                                    64          6.8014240000  0.1062722500
org-agenda-run-series                                         1           5.936252      5.936252
org-let2                                                      1           5.4234729999  5.4234729999
org-agenda-list                                               1           5.423455      5.423455
org-agenda-get-scheduled                                      56          3.7570829999  0.0670907678
org-todo-list                                                 1           2.412072      2.412072
org-end-of-subtree                                            3058        1.8816570000  0.0006153227
org-back-to-heading                                           10468       1.6175330000  0.0001545216
org-agenda-get-todos                                          8           1.4600440000  0.1825055000
org-get-todo-state                                            5082        1.2833800000  0.0002525344
org-get-tags-at                                               340         1.0942230000  0.0032183029
org-up-heading-safe                                           1577        1.0430819999  0.0006614343
org-prepare-agenda                                            3           1.02636       0.34212
org-prepare-agenda-buffers                                    2           0.94225       0.471125
org-agenda-get-deadlines                                      56          0.525749      0.0093883750
org-agenda-skip                                               7745        0.5250920000  6.779...e-05
org-let                                                       2           0.512741      0.2563705
org-agenda-get-timestamps                                     56          0.4285510000  0.0076526964
org-refresh-category-properties                               16          0.36568       0.022855
org-agenda-get-progress                                       56          0.3305779999  0.0059031785
org-finalize-agenda-entries                                   6           0.313683      0.0522805
org-agenda-get-restriction-and-command                        1           0.256535      0.256535
org-agenda-highlight-todo                                     344         0.2019640000  0.0005871046
org-agenda-get-blocks                                         56          0.1740139999  0.0031073928
org-time-string-to-absolute                                   4788        0.1524200000  3.183...e-05
org-add-props                                                 1392        0.1463960000  0.0001051695
org-format-agenda-item                                        344         0.1366120000  0.0003971279
org-agenda-get-sexps                                          56          0.1168700000  0.0020869642
org-outline-level                                             5872        0.1135730000  1.934...e-05
org-get-effort                                                341         0.0920470000  0.0002699325
org-entry-get                                                 341         0.0898990000  0.0002636334
org-entries-lessp                                             1623        0.0883479999  5.443...e-05
org-on-heading-p                                              540         0.0754820000  0.0001397814
org-get-wdays                                                 175         0.0732219999  0.0004184114
org-get-priority                                              277         0.0621459999  0.0002243537
org-at-date-range-p                                           268         0.0584360000  0.0002180447
org-get-property-block                                        341         0.057254      0.0001679002
org-finalize-agenda                                           3           0.054319      0.0181063333
org-parse-time-string                                         5096        0.0530510000  1.041...e-05
org-agenda-align-tags                                         2           0.042237      0.0211185
org-get-entries-from-diary                                    7           0.036036      0.005148
org-before-first-heading-p                                    341         0.0274209999  8.041...e-05
org-agenda-skip-eval                                          10610       0.0221319999  2.085...e-06
org-closest-date                                              322         0.0153310000  4.761...e-05
org-date-to-gregorian                                         644         0.0078180000  1.213...e-05
org-switch-to-buffer-other-window                             1           0.007546      0.007546
org-mode                                                      1           0.006625      0.006625
org-time-string-to-time                                       308         0.0062409999  2.026...e-05
org-agenda-fontify-priorities                                 2           0.00607       0.003035
org-agenda-new-marker                                         411         0.0059089999  1.437...e-05
org-agenda-files                                              7           0.0047399999  0.0006771428
org-fontify-priorities                                        2           0.004616      0.002308
org-agenda-fix-displayed-tags                                 344         0.004231      1.229...e-05
org-check-agenda-file                                         80          0.00419       5.2375e-05
org-set-startup-visibility                                    1           0.003561      0.003561
org-agenda-todayp                                             119         0.0034680000  2.914...e-05
org-cycle                                                     2           0.0034319999  0.0017159999
org-cycle-internal-global                                     2           0.0030499999  0.0015249999
org-get-todo-face                                             340         0.0030420000  8.947...e-06
org-get-agenda-file-buffer                                    80          0.0028379999  3.547...e-05
org-unhighlight                                               4           0.002836      0.000709
org-get-time-of-day                                           197         0.0026370000  1.338...e-05
org-today                                                     129         0.0026129999  2.025...e-05
org-detach-overlay                                            4           0.002476      0.000619
org-find-base-buffer-visiting                                 80          0.002256      2.82e-05
org-diary-sexp-entry                                          7           0.002052      0.0002931428
org-agenda-mode                                               2           0.002001      0.0010005
org-install-agenda-files-menu                                 1           0.001724      0.001724
org-float-time                                                411         0.0016190000  3.939...e-06
org-before-change-function                                    615         0.0014820000  2.409...e-06
org-split-string                                              322         0.0013459999  4.180...e-06
org-remove-uninherited-tags                                   592         0.0012670000  2.140...e-06
org-uniquify                                                  12          0.0012569999  0.0001047499
org-face-from-face-or-color                                   546         0.0011850000  2.170...e-06
org-activate-bracket-links                                    2           0.001185      0.0005925
org-downcase-keep-props                                       371         0.0011479999  3.094...e-06
org-agenda-get-category-icon                                  344         0.0009299999  2.703...e-06
org-get-category                                              341         0.0008939999  2.621...e-06
org-trim                                                      90          0.0008610000  9.566...e-06
org-hh:mm-string-to-minutes                                   126         0.0008189999  6.499...e-06
org-add-prop-inherited                                        256         0.0006989999  2.730...e-06
org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item  277         0.0006319999  2.281...e-06
org-set-regexps-and-options                                   1           0.000553      0.000553
org-agenda-add-time-grid-maybe                                5           0.000471      9.42e-05
org-diary-default-entry                                       7           0.0004340000  6.2e-05
org-agenda-cleanup-fancy-diary                                7           0.0004329999  6.185...e-05
org-add-to-diary-list                                         7           0.000382      5.457...e-05
org-agenda-get-day-face                                       7           0.0003509999  5.014...e-05
org-modify-diary-entry-string                                 7           0.0003180000  4.542...e-05
org-agenda-time-of-day-to-ampm-maybe                          130         0.0002789999  2.146...e-06
org-agenda-format-date-aligned                                7           0.000274      3.914...e-05
org-agenda-reset-markers                                      2           0.000178      8.9e-05
org-unfontify-region                                          3           0.000165      5.5e-05
org-compile-prefix-format                                     2           0.000146      7.3e-05
org-days-to-iso-week                                          7           0.0001129999  1.614...e-05
org-file-menu-entry                                           24          0.0001090000  4.541...e-06
org-agenda-mark-clocking-task                                 2           0.000106      5.3e-05
org-cycle-show-empty-lines                                    3           9.1e-05       3.033...e-05
org-agenda-span-name                                          10          7.7e-05       7.7e-06
org-cycle-item-indentation                                    2           7.4e-05       3.7e-05
org-cycle-hide-archived-subtrees                              3           7.2e-05       2.4e-05
org-extract-log-state-settings                                6           6.3e-05       1.05e-05
org-add-hook                                                  8           6.3e-05       7.875e-06
org-cycle-level                                               2           5.5e-05       2.75e-05
org-at-item-p                                                 2           5.4e-05       2.7e-05
org-set-font-lock-defaults                                    1           4.9e-05       4.9e-05
org-update-radio-target-regexp                                1           4.6e-05       4.6e-05
org-set-autofill-regexps                                      1           4.4e-05       4.4e-05
org-hide-block-toggle-maybe                                   2           4.3e-05       2.15e-05
org-babel-hide-result-toggle-maybe                            2           3.6e-05       1.8e-05
org-point-at-end-of-empty-headline                            2           3.5e-05       1.75e-05
org-assign-fast-keys                                          1           3.5e-05       3.5e-05
org-remove-font-lock-display-properties                       3           2.6e-05       8.666...e-06
org-babel-hide-all-hashes                                     1           2.6e-05       2.6e-05
org-hide-archived-subtrees                                    2           2.5e-05       1.25e-05
org-content                                                   1           2.5e-05       2.5e-05
org-cycle-hide-drawers                                        3           2.4e-05       8e-06
org-agenda-post-command-hook                                  4           2.2e-05       5.5e-06
org-make-options-regexp                                       1           2.2e-05       2.2e-05
org-set-visibility-according-to-property                      1           1.9e-05       1.9e-05
org-agenda-set-mode-name                                      2           1.8e-05       9e-06
org-agenda-mark-header-line                                   2           1.7e-05       8.5e-06
org-item-re                                                   3           1.7e-05       5.666...e-06
org-at-table-p                                                2           1.7e-05       8.5e-06
org-all-targets                                               1           1.3e-05       1.3e-05
org-remove-keyword-keys                                       1           1.2e-05       1.2e-05
org-optimize-window-after-visibility-change                   2           1.1e-05       5.5e-06
org-get-at-bol                                                2           1e-05         5e-06
org-load-modules-maybe                                        3           9e-06         3e-06
org-overview                                                  1           9e-06         9e-06
org-fit-agenda-window                                         2           8.000...e-06  4.000...e-06
org-set-sorting-strategy                                      2           7e-06         3.5e-06
org-region-active-p                                           1           6e-06         6e-06
org-src-native-tab-command-maybe                              2           6e-06         3e-06
org-delete-all                                                1           6e-06         6e-06
org-agenda-ndays-to-span                                      2           6e-06         3e-06
org-babel-result-hide-spec                                    1           5e-06         5e-06
org-fit-window-to-buffer                                      1           5e-06         5e-06
org-compute-latex-and-specials-regexp                         1           5e-06         5e-06
org-font-lock-add-tag-faces                                   2           4.999...e-06  2.499...e-06
org-clock-load                                                1           4e-06         4e-06
org-restart-font-lock                                         1           4e-06         4e-06
org-agenda-span-to-ndays                                      1           3e-06         3e-06
org-make-target-link-regexp                                   1           3e-06         3e-06

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Performance problem when switching agenda views - need for cache?
  2011-07-15 14:49 Performance problem when switching agenda views - need for cache? Rainer Stengele
  2011-07-15 16:00 ` Memnon Anon
@ 2011-07-15 20:10 ` Nick Dokos
  2011-07-15 22:21   ` Rainer Stengele
  1 sibling, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2011-07-15 20:10 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: nicholas.dokos, emacs-orgmode

Rainer Stengele <rainer.stengele@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-agenda                                                    2           17.624        8.812
> org-agenda-get-day-entries                                    64          13.610000000  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.812        11.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.921        10.921
> org-let2                                                      1           10.921        10.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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Performance problem when switching agenda views - need for cache?
  2011-07-15 20:10 ` Nick Dokos
@ 2011-07-15 22:21   ` Rainer Stengele
  2011-07-15 23:15     ` Nick Dokos
  0 siblings, 1 reply; 8+ messages in thread
From: Rainer Stengele @ 2011-07-15 22:21 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Rainer Stengele

Am 15.07.2011 22:10, schrieb Nick Dokos:
> Rainer Stengele <rainer.stengele@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-agenda                                                    2           17.624        8.812
>> org-agenda-get-day-entries                                    64          13.610000000  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.812        11.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.921        10.921
>> org-let2                                                      1           10.921        10.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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Performance problem when switching agenda views - need for cache?
  2011-07-15 22:21   ` Rainer Stengele
@ 2011-07-15 23:15     ` Nick Dokos
  2011-07-16  0:02       ` Rainer Stengele
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2011-07-15 23:15 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: Rainer Stengele, nicholas.dokos, emacs-orgmode

Rainer Stengele <rainer.stengele@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Performance problem when switching agenda views - need for cache?
  2011-07-15 23:15     ` Nick Dokos
@ 2011-07-16  0:02       ` Rainer Stengele
  2011-07-16 11:21         ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Rainer Stengele @ 2011-07-16  0:02 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Rainer Stengele

Am 16.07.2011 01:15, schrieb Nick Dokos:
> Rainer Stengele <rainer.stengele@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-agenda                                                    1           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-entries                                    56          4.3310179999  0.0773396071
org-agenda-get-scheduled                                      56          3.0745710000  0.0549030535
org-back-to-heading                                           8039        1.2780029999  0.0001589753
org-get-todo-state                                            4834        1.1381540000  0.0002354476
org-end-of-subtree                                            2745        0.9202930000  0.0003352615
org-let                                                       2           0.492812      0.246406
org-prepare-agenda                                            2           0.479444      0.239722
org-prepare-agenda-buffers                                    1           0.375417      0.375417
org-agenda-get-progress                                       56          0.3446030000  0.0061536250
org-time-string-to-absolute                                   4816        0.3424429999  7.110...e-05
org-agenda-get-deadlines                                      56          0.3267980000  0.0058356785
org-agenda-get-timestamps                                     56          0.2991630000  0.0053421964
org-agenda-skip                                               7493        0.2442860000  3.260...e-05
org-parse-time-string                                         5124        0.2435590000  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.1611779999  0.0005482244
org-refresh-category-properties                               8           0.139898      0.01748725
org-agenda-get-sexps                                          56          0.1148169999  0.0020503035
org-finalize-agenda-entries                                   6           0.1132310000  0.0188718333
org-agenda-highlight-todo                                     70          0.105273      0.0015039
org-at-date-range-p                                           269         0.0397219999  0.0001476654
org-get-entries-from-diary                                    7           0.0371        0.0053
org-format-agenda-item                                        70          0.02979       0.0004255714
org-outline-level                                             3268        0.0271430000  8.305...e-06
org-on-heading-p                                              270         0.0263160000  9.746...e-05
org-agenda-skip-eval                                          10114       0.0216819999  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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Performance problem when switching agenda views - need for cache?
  2011-07-16  0:02       ` Rainer Stengele
@ 2011-07-16 11:21         ` Bastien
  0 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2011-07-16 11:21 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: Rainer Stengele, nicholas.dokos, emacs-orgmode

Hi Rainer,

Rainer Stengele <rainer.stengele@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-16 12:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-15 14:49 Performance problem when switching agenda views - need for cache? Rainer Stengele
2011-07-15 16:00 ` Memnon Anon
2011-07-15 18:00   ` Rainer Stengele
2011-07-15 20:10 ` Nick Dokos
2011-07-15 22:21   ` Rainer Stengele
2011-07-15 23:15     ` Nick Dokos
2011-07-16  0:02       ` Rainer Stengele
2011-07-16 11:21         ` Bastien

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