On 05/03/2021 04:03, Samuel Wales wrote: > interesting. that would be great to speed it up. [i just meant that > the file list used to be correct.] I am a bit disappointed. I have managed to get x2 performance boost. At first, the result was x2 better but I realized that I did not added heading cleanup for the new strategy. It adds several regexp to the inner loop and severely hits performance. I do not like the idea to manually inline (with minor variations) existing functions and regexps, but the function is still slow. For a while, improvement is significant, so I am attaching the patch that should make jumps using org-goto or org-refile faster. I hope, I have not broken anything.