On 02/05/2021 13:59, Ihor Radchenko wrote:
Maxim Nikulin writes:
Some additions. org-outline-path-cache is used solely by
org-refile-get-targets (maybe there are some calls in other packages)
but it efficiency is questionable. It was not clear for me earlier that
the cache is reset before each scan through a buffer. So if
org-refile-use is disabled, org-outline-path-cache from previous run of
org-refile or org-goto is not used as well. A query to
org-outline-path-cache requires at least one backward search and hash
lookup. During sequential scan in org-refile-get-targets it is enough to
have previous heading path to update it when new heading is found. I
think, org-outline-path-cache should be deprecated.
At least helm-org-ql and helm-org are using `org-get-outline-path' with
cache. I do think it is useful. Though, indeed, not as fast as
single-pass scan. Probably, we can rewrite the code of
`org-get-outline-path' instead of deprecating it?
helm-org-ql.el that is a part of org-ql does not use cache when calling
org-get-outline-path. helm-org performs sequential scan similar to
org-refile-get-targets. Maybe a new function should be introduced to
address such case.
On 29/04/2021 21:12, Ihor Radchenko wrote:
Note that Org mode has integration with imenu. It is an alternative you
can use to jump around current buffer.
I do not see any advantages of imenu over jumping using org-goto or
org-refile with enabled cache.