From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: How to make agenda generation faster Date: Fri, 19 Oct 2018 08:04:16 +0800 Message-ID: <877eieiyyn.fsf@gmail.com> References: <87h8hy1ho5.fsf@mbork.pl> <87o9c34ocl.fsf@alphapapa.net> <877eirdrqt.fsf@nicolasgoaziou.fr> <87ftx5fx3n.fsf@alphapapa.net> <87pnw8engh.fsf@nicolasgoaziou.fr> <87h8hkqtfb.fsf@alphapapa.net> <87r2gm6fdp.fsf@nicolasgoaziou.fr> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDIHO-0004ew-U2 for emacs-orgmode@gnu.org; Thu, 18 Oct 2018 20:04:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDIHF-0007vP-A8 for emacs-orgmode@gnu.org; Thu, 18 Oct 2018 20:04:34 -0400 Received: from [61.175.244.13] (port=34669 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDIH7-0007bq-W6 for emacs-orgmode@gnu.org; Thu, 18 Oct 2018 20:04:25 -0400 In-reply-to: <87r2gm6fdp.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Adam Porter , emacs-orgmode@gnu.org >> However, before it could be suitable as a possible replacement, it will >> likely require more optimization. Some queries, especially more complex >> ones, are slower than the equivalent searches and agendas in the current >> Org Agenda code. This is because of the way the queries run predicates >> on each heading. Despite the current Org Agenda code's complexity, it >> is well optimized and hard to beat. > > Are you saying that queries are turned into regexp searches within Org > files? If so, I don't think they should. > > Queries should only operate on the output of the data extraction, > possibly a list of defstructs. I.e., you first extract all meaningful > data from the document (during idle time, with cache, or whatever > optimization would be chosen), store it in an appropriate format, then > query it. > I think the same way. In some language library like Clojure's enlive handle the HTML string the same way. -- [ stardiviner ] don't need to convince with trends. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3