emacs-devel
[Top][All Lists]
Advanced

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

29.0.91 756244c696 Saving large org file can be slow with time-stamp bef


From: Yuchen Pei
Subject: 29.0.91 756244c696 Saving large org file can be slow with time-stamp before-save-hook
Date: Sat, 03 Jun 2023 21:33:54 +1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

emacs-29 756244c69638bc3562d8cd2c1aa126216e99fb29 build.

Not sure how to reprod with something from scratch. But here are the
steps to reprod with a large "organic" org file with emacs -Q

- (add-hook 'before-save-hook 'time-stamp)
- Open a very large org file with a "Time-stamp:" at the beginning of the
  file
- (setq org-refile-use-cache t)
- (setq org-refile-use-outline-path t)
- (setq org-refile-targets '((org-agenda-files :maxlevel . 5)))
- (setq org-goto-interface 'outline-path-completion)
- M-x org-goto, which triggers `org-refile-get-targets`, wait for it to
  finish
- Make a minimal change to the file, e.g. add a space then delete it.
- M-x save-buffer / C-x C-s - and it takes too long to save

The problem disappears if I remove the hook or do not run org-goto and
trigger generation of the cache, and the problem does not manifest in
28.2 either.

Best,
Yuchen

-- 
PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
          <https://ypei.org/assets/ypei-pubkey.txt>



reply via email to

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