[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI Speedup of publish command in master
From: |
Gustav Wikström |
Subject: |
FYI Speedup of publish command in master |
Date: |
Sun, 27 Jun 2021 08:15:27 +0000 |
Hi,
In a similar vein as the speedups of scanning for IDs that was made a while
back, there now is a speedup for org publish as well. Soon to be pushed to
code.orgmode.org (we're still using that, aren't we?) with commit aa0fa8c75.
The speedup is seen when scanning through files to decide if an existing cache
can be used or not.
A note on the topic, fwiw. Loading an Org mode file using find-file is very
slow. So when there is a reason for looking through the content of Org mode
files, or any file for that matter, and there is no reason for triggering
hooks, consider instead inserting the content of the file in a delay-mode-hooks
macro within a temporary buffer (using the with-temp-buffer macro).
Example:
*Instead of*:
(find-file path-to-file)
;; do stuff
(...)
;; clean up state
(kill-buffer ...)
*Consider*:
(with-temp-buffer
(delay-mode-hooks
(insert-file-contents path-to-file)
;; do stuff
(...)))
Best
Gustav
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI Speedup of publish command in master,
Gustav Wikström <=