From: Nick Dokos <nicholas.dokos@hp.com>
To: Rainer Stengele <rainer.stengele@diplan.de>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: Performance problem when switching agenda views - need for cache?
Date: Fri, 15 Jul 2011 16:10:51 -0400 [thread overview]
Message-ID: <5990.1310760651@alphaville.americas.hpqcorp.net> (raw)
In-Reply-To: Message from Rainer Stengele <rainer.stengele@diplan.de> of "Fri, 15 Jul 2011 16:49:11 +0200." <ivpk17$ji3$1@dough.gmane.org>
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
next prev parent reply other threads:[~2011-07-15 20:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5990.1310760651@alphaville.americas.hpqcorp.net \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=rainer.stengele@diplan.de \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.