[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: Adam Porter
Subject: Re: [O] Is there a way to get all agenda TODOs programmatically?
Date: Wed, 03 Jan 2018 08:16:44 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

Hi Nicolas,

> 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.

Yes, when I discovered that, I was very surprised that multi-day agendas
are as fast as they are!

>> 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.

Thanks.  I checked my notes again, and I see that funcall overhead was
not actually the issue (at least, I hadn't gotten far enough for it to
be).  The problem was that org-element-parse-buffer was very slow in
comparison, since it parses the entire buffer rather than, as you said,
just interesting parts.  So I'm trying another approach that doesn't
parse the whole buffer, which seems to show promise...

reply via email to

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