From: Samuel Wales <firstname.lastname@example.org> To: Maxim Nikulin <email@example.com> Cc: firstname.lastname@example.org Subject: Re: org-refile-use-cache and jumps using org-refile or org-goto Date: Thu, 4 Mar 2021 14:03:58 -0700 [thread overview] Message-ID: <CAJcAo8tmH9HuaozCnJyrcJiBTfXLPvXDj4gBPFMn5kAZwm0HGA@mail.gmail.com> (raw) In-Reply-To: <email@example.com> interesting. that would be great to speed it up. [i just meant that the file list used to be correct.] but it is slow these days. for me, (benchmark-run 1 (length (org-refile-get-targets))) is 8s for 5886 targets. i presume you mean something like that up heading is unnecessary because you can keep a running olpath as you search. On 3/4/21, Maxim Nikulin <firstname.lastname@example.org> wrote: > On 03/03/2021 09:34, Samuel Wales wrote: >> >> until recently in maint, ido and ido hacks with both refile and refile >> goto [note: org-refile with a goto arg, not org-goto] has worked >> perfectly. with no cache. now, there is an issue, where with no >> cache that i know of, the first use, or the first use in a long time, >> will actually present a huge file list that includes crazy elements >> and is not constrained by even the verify function. > > Concerning performance. After reading your message I have realized that > it should be really fast to extract several thousand headings from a > buffer using regexp. However actually it is not so: > > (benchmark-run 10 (and (org-refile-get-targets) nil)) > | 9.868742533999999 | 40 | 2.999932755999996 | > > So preparing the list of refile targets currently takes almost precisely > 1 second. It is slow. Results are same for org-9.1.6 and > release_9.4.4-231-gf46925. I am surprised however that 9.1.6 and 9.3.1 > are installed as system packages and have compiled files. I have not > compiled git version but it works with the same speed. > > (length (org-refile-get-targets)) > : 3220 > > Preferences: > > (require 'org-refile) > (setq org-agenda-files '("~/notes/notes.org")) > (setq org-refile-use-cache nil) > (setq org-refile-use-outline-path t) > (setq org-outline-path-complete-in-steps nil) > (setq org-refile-targets '((org-agenda-files :maxlevel . 5))) > > Some lines from profile: > > - org-refile-get-targets 8414 74% > ... - org-get-outline-path 7403 65% > ... - org--get-outline-path-1 7286 64% > ... - org-up-heading-safe 6328 56% > > There is a room for improvement. Outline paths could be obtained in a > single pass without backward search. It should speed up building the > list of targets by 2 or 3 times. > > Though it is unrelated to issues with default option and cache entries > when both ways to call org-refile are used: directly and through org-goto. > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
next prev parent reply other threads:[~2021-03-04 21:04 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-02 17:15 Maxim Nikulin 2021-03-03 2:34 ` Samuel Wales 2021-03-04 13:51 ` Maxim Nikulin 2021-03-04 21:03 ` Samuel Wales [this message] 2021-03-06 16:15 ` [PATCH] optimize org-refile-get-targets Maxim Nikulin 2021-04-25 12:25 ` Bastien 2021-04-25 15:24 ` Maxim Nikulin 2021-03-04 14:47 ` org-refile failed due to default option stored by org-goto Maxim Nikulin 2021-03-04 22:53 ` Samuel Wales 2021-03-09 11:57 ` Maxim Nikulin
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=CAJcAo8tmH9HuaozCnJyrcJiBTfXLPvXDj4gBPFMn5kAZwm0HGA@mail.gmail.com \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: org-refile-use-cache and jumps using org-refile or org-goto' \ /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
Code repositories for project(s) associated with this 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).