From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: Asynchronous org-agenda-redo Date: Fri, 13 Dec 2019 22:50:54 -0600 Message-ID: <87d0crse6p.fsf@alphapapa.net> References: <87k172ot2m.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <87pngtsppt.fsf@alphapapa.net> <87o8wda6nv.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <87h824sos5.fsf@alphapapa.net> <87wob0fwsg.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44812) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifzOU-00055r-JT for emacs-orgmode@gnu.org; Fri, 13 Dec 2019 23:51:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifzOT-0003aD-Je for emacs-orgmode@gnu.org; Fri, 13 Dec 2019 23:51:06 -0500 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:37018 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifzOT-0003Uu-BQ for emacs-orgmode@gnu.org; Fri, 13 Dec 2019 23:51:05 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1ifzOR-0000KT-35 for emacs-orgmode@gnu.org; Sat, 14 Dec 2019 05:51:03 +0100 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: emacs-orgmode@gnu.org Ihor Radchenko writes: >> org-ql doesn't use skip functions, just queries. > > Skip functions are essentially used-defined queries as soon as the > queries are tested against every headline. Skip functions aren't necessary with org-ql, because the query itself can have arbitrary Lisp code. So, of course, you can call custom functions in queries, even your own skip functions (with `not', of course), but in most cases, they can be covered with built-in predicates. > I can rewrite my skip functions into queries, but I don't expect much > improvement since org-ql seems to use org-entry-get, which is the main > performance bottleneck for my agenda generation. org-entry-get is only called for the (property) predicate. It's the correct way to get Org properties, because it handles special properties, inheritance, etc. However, when possible, queries are optimized to a whole-buffer regexp search that finds possible matches. So, for example, a query like '(property "owner" "yantar") would be optimized to a whole-buffer regexp search that would be very fast. See function org-ql--query-preamble.