From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Is there a way to get all agenda TODOs programmatically? Date: Wed, 03 Jan 2018 14:49:25 +0100 Message-ID: <878tdff3x6.fsf@nicolasgoaziou.fr> References: <87376v36up.fsf@mbork.pl> <87a813rqdx.fsf@fastmail.fm> <87r2ue29j8.fsf@mbork.pl> <874lrasxu2.fsf@fastmail.fm> <877et5joln.fsf@mbork.pl> <87shbqv58k.fsf@alphapapa.net> <87vagjffuq.fsf@mbork.pl> <87vagjtgom.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWjQA-0005lt-4d for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 08:49:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWjQ9-0005dQ-8V for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 08:49:30 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:54439) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eWjQ9-0005d3-2H for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 08:49:29 -0500 In-Reply-To: <87vagjtgom.fsf@alphapapa.net> (Adam Porter's message of "Wed, 03 Jan 2018 03:50:01 -0600") 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" To: Adam Porter Cc: emacs-orgmode@gnu.org Hello, Adam Porter writes: > There are some examples of attempts at better APIs (e.g. my PoC > org-agenda-ng code, Remy Honig's > , 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. Regards, -- Nicolas Goaziou