emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: Asynchronous org-agenda-redo
Date: Thu, 12 Dec 2019 06:17:18 -0600	[thread overview]
Message-ID: <87pngtsppt.fsf@alphapapa.net> (raw)
In-Reply-To: 87k172ot2m.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me

Be sure to read the Emacs Lisp manual regarding threads.  They are
cooperative, so functions called as threads must yield back to the main
thread for Emacs to do anything else before the function returns.

If you're feeling adventurous, you could experiment with adding yields
in relevant agenda functions.  But that wouldn't be suitable for merging
into Org, because that yielding also decreases performance generally.

As long as Elisp threads are cooperative, they are of very limited use.

Generating agendas with async.el in a separate Emacs process is an
interesting idea, but probably generally impractical for a few reasons:

1.  The process would have to load the same Org buffers, which takes
    time, especially in large buffers.  Depending on configuration, it
    can take some time, indeed.
2.  The process would also have to load the same packages (or, at least,
    all the necessary ones, which depends on configuration), which takes
3.  Ensuring that configuration and state between the main Emacs process
    and the separate, agenda-generating process is not necessarily
    simple.  Consider as well that if a buffer had unsaved changes,
    those would not be readable by the other process, which would lead
    to invalid results.  One could force the buffers to be saved first,
    but that may not always be desirable, as saving buffers can have
    side effects.

If your agenda buffers are taking too long to refresh, you might
consider org-ql's views/saved-searches as an alternative.  The built-in
caching in org-ql significantly improves performance, especially when
refreshing views.

  reply	other threads:[~2019-12-12 12:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12  8:18 Asynchronous org-agenda-redo Ihor Radchenko
2019-12-12 12:17 ` Adam Porter [this message]
2019-12-12 15:46   ` Ihor Radchenko
2019-12-13  6:49     ` Adam Porter
2019-12-13  8:35       ` Ihor Radchenko
2019-12-13  9:39         ` Ihor Radchenko
2019-12-14  4:59           ` Adam Porter
2019-12-22  6:54             ` Ihor Radchenko
2019-12-24  0:36               ` Adam Porter
2019-12-14  4:50         ` Adam Porter
2019-12-16  7:23           ` Ihor Radchenko
2019-12-16 10:32             ` Adam Porter
2019-12-12 12:51 ` Diego Zamboni
2019-12-12 14:58   ` Ihor Radchenko
2019-12-15 11:56     ` Asynchronous org-babel-tangle (was Re: Asynchronous org-agenda-redo) Diego Zamboni
2019-12-15 13:40       ` Ihor Radchenko
2019-12-15 13:41       ` Ihor Radchenko

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:

  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=87pngtsppt.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=emacs-orgmode@gnu.org \


* 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


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