From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Hack: org-agenda-cache.el Date: Mon, 16 Jan 2012 13:18:57 +0100 Message-ID: <4E8292DA-B295-4DE6-999F-205D7DF9CA79@gmail.com> References: <87r4z0bveo.wl%max@openchat.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmlWd-0008S1-9i for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 07:19:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmlWc-0000La-2Y for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 07:18:59 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:35931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmlWb-0000LQ-UG for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 07:18:58 -0500 Received: by eaan1 with SMTP id n1so1019886eaa.0 for ; Mon, 16 Jan 2012 04:18:56 -0800 (PST) In-Reply-To: <87r4z0bveo.wl%max@openchat.com> 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: Max Mikhanosha Cc: emacs-orgmode@gnu.org Hi Max, this is a pretty good solution if the main issue with slow agenda is that it feels slow because you are often switching back and forth between different agenda buffers. I like it, and I would vote for integration into Org-mode, not as a separate package, but directly, as an option. If Bastien agrees, maybe you could make a patch which introduces this into the main code. Three comments: 1. I think there needs to be a command to remove all agenda buffers, to = make sure that everything is updated. Maybe this could be "C-u r" or = so, which would rebuilt the current and remove all others. This = commands needs to make sure that all markers are safely discarded - = otherwise you will die the marker death eventually. 2. I don't think that "-cache" is the best name choice for this, because = this is not a caching mechanism. It is a "multiple-agenda-buffers" thing. 3. One caveat for this is that maybe in some places, = org-agenda-marker-table is modified while the agenda buffer is not current (I am not sure, I = just think this needs to be checked). If so, one would need to pop to = the relevant agenda buffer to make the change. Just my 2c, of course. - Carsten On 15.1.2012, at 20:47, Max Mikhanosha wrote: > As my agenda files slowly grew over the years, the speed of generating > agenda had slowly deteriorated, finally hitting the point of me jdoing > something about it. (it got to around 5-7 seconds, which kind of > interrupts work-flow) >=20 > Attached file org-agenda-cache.el is a "quick fix" solution that I > developed for myself, its more of a request for discussion and not > intended as contribution yet. >=20 > Basic idea is: >=20 > 1. Multiple-agenda buffers can exist at the same time, having separate > tag filters and other such settings. This is accomplished by bunch of > org-agenda-* variables being made buffer-local. >=20 > 2. Custom agenda commands should bind `org-agenda-buffer-name' = variable, > so that for example C-c a generates "*Agenda*" buffer and C-c t > generates "*Todo List*" buffer.=20 >=20 > 3. org-agenda checks if buffer with `org-agenda-buffer-name' exists > and if it does, it will show that buffer, rather then re-generating > it. To generate a fresh agenda, becomes C-c a r instead of C-c a >=20 > 4. org-agenda-quit buries the agenda buffer instead of killing it. >=20 > 5. All of the above shenanigans can be switched on and off by doing > M-x toggle-org-agenda-caching command, its off by default so you have > to turn it on after loading the file. >=20 > I had been using this setup for last few days, and it had really been > a blast, returning me to the times when I just started with org-mode, > and information had appeared in milliseconds rather then seconds. >=20 >