emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mikhail Skorzhinskii <mskorzhinskiy@eml.cc>
To: emacs-orgmode@gnu.org
Subject: Re: ANN: org-ql agenda block support
Date: Thu, 12 Sep 2019 21:19:01 +0200	[thread overview]
Message-ID: <87tv9h8gre.fsf@eml.cc> (raw)
In-Reply-To: <87ftlhlxl7.fsf@alphapapa.net>

Great overview, thanks a lot.

So I give it a try and completely fell in love. On my data set it is
visibly faster then org-agenda. I also wrote a lot of code around
org-agenda over the years to support my sometimes awkward needs. And now
I just threw all this ugly code away!

That was very emotional moment for me, very good job, kind sir.

Adam Porter <adam@alphapapa.net> writes:

 > Mikhail Skorzhinskii <mskorzhinskiy@eml.cc> writes:
 >
 > > Adam Porter <adam@alphapapa.net> writes:
 > >  > However, the org-ql-block version runs in about 1/5th the time (0.7
 > >  > seconds compared to 3.45 seconds on my collection of org-agenda-files).
 > >
 > > For some reason I thought that on average org-ql package is working
 > > slower then native org-agenda searches. Probably because there are more
 > > control and interface is much more simpler and cleaner and nothing
 > > comes free of charge. That sort of thing. :-)
 >
 > Well, it might also be because it used to be generally slower, and I
 > tried to be clear about that whenever I mentioned it.  :)  But I've
 > applied a lot of optimizations to it over the past few months, so it's
 > generally pretty fast now, sometimes much faster.  It's hard to make a
 > direct comparison in some cases, depending on the complexity of the
 > query.  I plan to continue optimizing it as I'm able, so hopefully it
 > will continue improving.
 >
 > > I am really glad that I was mistaken. Care to drop a few thoughts on why
 > > this is the case? This is applicable only for ql-block or other org-ql
 > > functions are a bit faster too?
 >
 > Well, it's a completely different implementation.  It has two main
 > features which attempt to make it fast: it uses regexp searches across
 > buffers as much as possible, similar to org-agenda.el but in a more
 > flexible way (though there's still room for improvement here, especially
 > with complex queries); and it caches results keyed on the query, buffer,
 > and narrowing (cached results are discarded when a buffer is modified),
 > which avoids re-running the same queries for unmodified buffers.  Oh,
 > and it also byte-compiles query predicates and action functions to eke
 > out a bit more speed.
 >
 > And in general, I run benchmarks and try to improve performance when
 > possible; you can see some of the benchmark results in the notes.org
 > file in the repo (not all of which are up-to-date with current org-ql
 > code).
 >
 > org-ql-block is just a way to make use of the results returned by org-ql
 > queries; other ways include org-ql-agenda, org-ql-search, and of course
 > you can use the raw results however you like, including calling whatever
 > :action function you like at matching entries, to return whatever kind
 > of data you need, or even perform actions directly on entries.
 >
 > In other words, the querying code is separate from the display-related
 > code, so all org-ql-block, org-ql-agenda, org-ql-search, etc. do is
 > format results from org-ql queries and display them.
 >
 > Upcoming features include an org-ql-sparse-tree command, like
 > org-sparse-tree but using org-ql queries; recursive queries; and
 > probably a timeline view like I recently posted about.
 >
 > Please let me know if you have any feedback!

  reply	other threads:[~2019-09-12 19:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 15:07 ANN: org-ql agenda block support Adam Porter
2019-08-12 15:39 ` Mikhail Skorzhinskii
2019-08-31  5:20   ` Adam Porter
2019-09-12 19:19     ` Mikhail Skorzhinskii [this message]
2019-09-17  4:36       ` Adam Porter
2019-08-25 17:38 ` Milan Zamazal
2019-08-25 18:18   ` Samuel Wales
2019-08-30 10:44     ` Adam Porter
2019-08-31  0:20       ` Samuel Wales
2019-08-31  5:01         ` Adam Porter
2019-09-07  0:43           ` Samuel Wales
2019-09-07 14:32             ` Adam Porter
2019-09-08  0:46               ` Samuel Wales
2019-08-30  9:19   ` Adam Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tv9h8gre.fsf@eml.cc \
    --to=mskorzhinskiy@eml.cc \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).