From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Adam Porter <adam@alphapapa.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to make agenda generation faster
Date: Tue, 09 Oct 2018 18:11:54 +0200 [thread overview]
Message-ID: <877eirdrqt.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87o9c34ocl.fsf@alphapapa.net> (Adam Porter's message of "Tue, 09 Oct 2018 01:37:46 -0500")
Hello,
Adam Porter <adam@alphapapa.net> writes:
> My feedback is: there be dragons. ;) The Agenda code is very
> complicated and hard to follow, and it's hard to optimize something that
> is hard to understand.
And hard to maintain. We should really do something about it.
> In the long run, to get significant speed improvements, I think it may
> be necessary to reimplement the Agenda.
Agreed.
> However, due to the nature of it (i.e. regexp searches through buffers
> to find entries), I don't know how much faster it can be made. I don't
> mean that I doubt it can be--I mean that, truly, I don't know, because
> it's hard to understand the flow of the code.
>
> I think that it is already fairly well optimized, given its limitations.
> However, an example of a potential improvement would be to refactor it
> to work with lexical-binding enabled (which didn't exist when it was
> first created); I can't say how much of an improvement it would make,
> but my understanding is that code that runs with lexical-binding enabled
> is generally faster.
Not really. But it's certainly easier to understand since it removes one
class of problems.
> But doing that would be a non-trivial project, I
> think, requiring the fixing of many inevitable regressions in the
> process.
>
> If you haven't seen them already, you may find my org-ql and
> org-ql-agenda code useful. org-ql-agenda presents an Agenda-like
> buffer. N.B. It does *not* implement most of the Agenda features, but
> it does emulate an Org Agenda buffer by setting the appropriate text
> properties on entries and formatting them in a similar way.
Instead of re-inventing the wheel, or putting efforts into a wheel-like
invention, wouldn't it make sense to actually work on Org Agenda itself?
I didn't look closely at org-ql, but I had the idea of splitting the
Agenda in two distinct parts. One would be responsible for collecting,
possibly asynchronously, and caching data from Org documents. The other
one would provide a DSL to query and display the results extracted from
the output of the first part. The second part could even be made generic
enough to be extracted from Org and become some part of Emacs.
Displaying filtered data, maybe in a timeline, could be useful for other
packages. Unfortunately, I don't have time to work on this. Ah well.
So again, wouldn't it be nice to think about Org Agenda-ng?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2018-10-09 16:12 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-07 4:53 How to make agenda generation faster Marcin Borkowski
2018-10-08 7:20 ` Michael Welle
2018-10-10 20:03 ` Marcin Borkowski
2018-10-10 21:01 ` Samuel Wales
2018-10-11 6:48 ` Michael Welle
2018-10-11 8:48 ` Marcin Borkowski
2018-10-11 19:59 ` Samuel Wales
2018-10-14 8:51 ` Marcin Borkowski
2018-10-09 6:37 ` Adam Porter
2018-10-09 16:11 ` Nicolas Goaziou [this message]
2018-10-10 20:01 ` Marcin Borkowski
2018-10-16 20:35 ` Adam Porter
2018-10-17 7:04 ` Ihor Radchenko
2018-10-17 13:01 ` Nicolas Goaziou
2018-10-17 19:12 ` Adam Porter
2018-10-18 22:48 ` Nicolas Goaziou
2018-10-19 0:04 ` stardiviner
2018-10-20 2:12 ` Adam Porter
2018-10-20 8:12 ` Nicolas Goaziou
2018-10-10 19:59 ` Marcin Borkowski
2018-10-09 11:47 ` Julius Dittmar
2018-10-10 20:03 ` Marcin Borkowski
2018-10-11 6:40 ` Michael Welle
2018-10-14 7:42 ` Marcin Borkowski
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=877eirdrqt.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=adam@alphapapa.net \
--cc=emacs-orgmode@gnu.org \
/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).