From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Switch org-agenda-get-* defuns to operate on date ranges Date: Sat, 31 Aug 2013 08:18:10 +0200 Message-ID: <38DE236A-5CC0-4E12-8487-0CE36A3F566B@gmail.com> References: <87ppwlzsc9.fsf@kafka.loc> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFeVn-0002c8-Ta for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 02:18:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFeVi-00039l-32 for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 02:18:19 -0400 Received: from mail-ee0-x235.google.com ([2a00:1450:4013:c00::235]:49354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFeVh-00039h-Rx for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 02:18:14 -0400 Received: by mail-ee0-f53.google.com with SMTP id b15so1299824eek.12 for ; Fri, 30 Aug 2013 23:18:13 -0700 (PDT) In-Reply-To: <87ppwlzsc9.fsf@kafka.loc> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?iso-8859-1?Q?Jonas_H=F6rsch?= Cc: emacs-orgmode@gnu.org, Florian Friesdorf Hi J=F6rg, I think it would be feasible to write such a modification. - Carsten On 20.5.2013, at 15:36, Jonas H=F6rsch wrote: > hello everyone, >=20 > 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: >=20 > 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. >=20 > --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,...}. >=20 > 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. >=20 > 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? >=20 > 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! >=20 > cheers, > jonas >=20 >=20