From: Ihor Radchenko <yantar92@gmail.com>
To: Anders Johansson <mejlaandersj@gmail.com>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [BUG?] Cache: org-scan-tags behaves differently on inlinetasks with and without cache
Date: Mon, 22 Nov 2021 23:02:35 +0800 [thread overview]
Message-ID: <87sfvofd2s.fsf@localhost> (raw)
In-Reply-To: <CAKJdtO-tN3m4R-Vto=BkjLhGKdNasGZ4HRrLYd838OOrh4PhWA@mail.gmail.com>
Anders Johansson <mejlaandersj@gmail.com> writes:
> I had considered to implement some kind of cache in my code, but now I
> get this "for free"! I originally didn't use org-scan-tags but some
> custom and "simpler" code for scanning, but I am glad I refactored to
> use org-scan-tags, because now I get this speedup without a single
> code change in orgqda.
You can achieve even better speedup if you directly use
org-element-cache-map with :next-re/:fail-re parameters. If you are
matching against specific tags, those tags can be used to create a
regexp to locate match candidates very quickly.
Beware that org-element-cache-map does not work without
org-element-use-cache set to t (it is, by default).
Best,
Ihor
prev parent reply other threads:[~2021-11-22 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 8:29 [BUG?] Cache: org-scan-tags behaves differently on inlinetasks with and without cache Anders Johansson
2021-11-22 11:35 ` Ihor Radchenko
2021-11-22 14:39 ` Anders Johansson
2021-11-22 15:02 ` Ihor Radchenko [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sfvofd2s.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mejlaandersj@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.