From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Mikhanosha Subject: Re: speeding up org (was How could I mix COMMENT and TODO?) Date: Fri, 06 Apr 2012 11:17:48 -0400 Message-ID: <87haww7uub.wl%max@openchat.com> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGAvQ-0002WT-T4 for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 11:18:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGAvD-0001ux-37 for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 11:18:04 -0400 Received: from openchat.com ([75.99.81.170]:59241 helo=momoland.openchat.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGAvC-0001uT-V8 for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 11:17:55 -0400 In-Reply-To: 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: Rustom Mody Cc: emacs-orgmode At Fri, 6 Apr 2012 18:40:43 +0530, Rustom Mody wrote: >=20 > Fran=C3=A7ois wrote: > =C2=A0 >=20 > In my very first tries with Org, a few months ago, I put all Org files > into the agenda, to discover that Org was very, very slow. =C2=A0So, I > changed it all and collected all agenda and TODO into three files onl= y, > holding lots of links to all other Org files where the information > really was. =C2=A0Org recovered all its speed. =C2=A0And besides, to = repair the > lost search capabilities, I kludged M-x rgrep so it could search all = Org > files and "reveal" contents when visiting hits. =C2=A0Well, the "reve= al" does > not always work, but yet, the quicker search is constantly useful to = me. > =20 > Currently, having put TODOs back in their proper Org files and declar= ing > them as agenda files, 38 agenda files are taken out from 360 Org file= s. > Even if slightly less speedy than 3 agenda files, this is still very > bearable: Org does not crawl. =C2=A0The way Org handles "org-agenda-f= iles" as > a string naming a file is really convenient to me, it eases the writi= ng > of external programs acting on them all. =C2=A0All in all, very satis= factory! >=20 > Hi Fran=C3=A7ois, >=20 > I made the suggestion that ragel should/could be part of emacs: > http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00864.html >=20 > Summarised by saying that if ragel is integrated into elisp, org code cou= ld become both significantly faster and more readable. >=20 > That most sluggish elisp code may be so due to regular expression code, i= s discussed here: > http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg01202.html >=20 > [In all fairness this is all a bit OT for an org list and should really b= e on an emacs devel list] Experiencing slow generation of agenda, was the reason for writing sticky agendas branch. It takes more of a "fix the symptom" approach, instead speeding up agenda generation, it caches the agenda buffer itself and lets user refresh it, while also allowing for multiple agenda buffers, so that a C-c a / search buffer, does not discard your C-c a a one. My initial idea was to wrap all the scanner functions (like org-todo-list or org-tags-view), with caches, but after a day or so it was obvious that its not a "a few days" task. But if someone takes up task of speeding up agenda generation, IMHO the idea of re-factoring the scanning functions to avoid re-scanning .org files that had not changed, will have best chance of producing results. Regards, Max