emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: "Jonas Hörsch" <coroa@online.de>
Cc: emacs-orgmode@gnu.org, Florian Friesdorf <flo@chaoflow.net>
Subject: Re: Switch org-agenda-get-* defuns to operate on date ranges
Date: Sat, 31 Aug 2013 08:18:10 +0200	[thread overview]
Message-ID: <38DE236A-5CC0-4E12-8487-0CE36A3F566B@gmail.com> (raw)
In-Reply-To: <87ppwlzsc9.fsf@kafka.loc>

Hi Jörg,

I think it would be feasible to write such a modification.

- Carsten

On 20.5.2013, at 15:36, Jonas Hörsch <coroa@online.de> wrote:

> hello everyone,
> 
> i've just started to use calfw to get a nice calendar-like display of my
> agenda. unfortunately i was slighly dismayed at the build-up speed
> easily exceeding a few seconds on my not so packed schedule. profiling
> into the code i found that the problem mainly is:
> 
> there exists only the possibility to retrieve agenda data for one day
> day, org-agenda.el's org-agenda-get-day-entries, rather than for a range
> of days. this makes it necessary to loop over --get-day-entries to collect
> all entries to show in the monthly calendar.
> 
> --get-day-entries for its part has to parse (basically regex-search
> through) the respective org agenda file completely on each invocation;
> effectively done by org-agenda-get-{todos,blocks,sexps,...}.
> 
> i imagine it is quite feasible to implement
> (defun org-agenda-get-entries (file beg end &rest args) ...)
> to sift through FILE but once and return an alist like
> ((date . (entry1 entry2 ..)) ..)
> containing all entries between dates BEG and END, inclusive.
> 
> neglecting the extra overhead for sorting entries into the alist, this
> promises to speed up typical weekly agenda collection by a factor of 7
> and calfw even by a factor of approx. 30, shouldn't it?
> 
> before i start a local branch to try myself on this refactoring work,
> i'd welcome a few comments, why i should be likely to fail or succeed!
> 
> cheers,
> jonas
> 
> 

      reply	other threads:[~2013-08-31  6:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 13:36 Switch org-agenda-get-* defuns to operate on date ranges Jonas Hörsch
2013-08-31  6:18 ` Carsten Dominik [this message]

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=38DE236A-5CC0-4E12-8487-0CE36A3F566B@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=coroa@online.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=flo@chaoflow.net \
    /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).