emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG?] Cache: org-scan-tags behaves differently on inlinetasks with


From: Ihor Radchenko
Subject: Re: [BUG?] Cache: org-scan-tags behaves differently on inlinetasks with and without cache
Date: Mon, 22 Nov 2021 23:02:35 +0800

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]