[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Is there a way to get all agenda TODOs programmatically?

From: Nicolas Goaziou
Subject: Re: [O] Is there a way to get all agenda TODOs programmatically?
Date: Wed, 03 Jan 2018 14:49:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)


Adam Porter <address@hidden> writes:

> There are some examples of attempts at better APIs (e.g. my PoC
> org-agenda-ng code, Remy Honig's
> <https://github.com/remyhonig/org-query>, and some other people's
> personal configs here and there), but I'm guessing they all suffer from
> Emacs's function call overhead.  IIUC the agenda is as fast as it is
> because of the way it's largely written in large functions.  :)

I don't think the size of the functions matter much. Agenda is optimized
for single day view, so it is fast in this case because it only looks
for "interesting" headlines. However, this mechanism is terrible for
multi-days agendas: Agenda treats them as multiple single days agendas,
so you end up looking again and again at the same entries.

> An idea I had recently was to make more use of inline functions,
> defsubst, etc, to avoid that.  It might let us make the code more
> functional while letting the byte-compiler optimize it.  At the same
> time, I wonder why it isn't already that way--maybe better Emacs
> programmers know why it wouldn't be a good idea.

Usually, you inline a function if you are certain funcall overhead is
responsible for the slowness.


Nicolas Goaziou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]