From: Ihor Radchenko <email@example.com>
To: Samuel Wales <firstname.lastname@example.org>
Cc: email@example.com, David Masterson <firstname.lastname@example.org>
Subject: Re: Tips on maintaining history in Org Mode
Date: Mon, 01 Mar 2021 11:42:38 +0800 [thread overview]
Message-ID: <87pn0j8rpt.fsf@localhost> (raw)
Samuel Wales <email@example.com> writes:
> Hi Ihor,
> it never occurred to me that bulk archiving could be sped up by
> changing anything about the archive files. i assumed that archiving
> worked by appending to those files, so once the initial find-file was
> performed, there should be no additional slowness.
Disregarding the initial find-file (which may also be very slow on large
archives), the slowness is happening because many org-mode commands are
using line-motion functions that respect visibility. Those commands
become slow when there are many folded elements (see  for technical
details why). So, many org commands tend to lag on large archives.
The lags can be solved in several ways:
1. Reduce the archive file size
2. Use optimised folding mechanism  (this will speed up org-mode in
general as well)
3. (untested) Put #+STARTUP: showeverything at the beginning of the
archives, so that nothing is going to be folded
> i will keep in mind disabling font lock in archive files. any
> suggested code for that?
Note that it will mostly affect find-file performance. To disable
font-lock, you will need to customise font-lock-global-modes, so that it
does not auto-start in org-mode. The value should be something like
'(not org-mode), but check the current value - you may have other
customisation in place.
Then, you will need to have a custom org-mode-hook that activates
font-lock only when the org file is not the archive file. Something like
(defun yant/font-lock-activate-maybe ()
"Activate font-lock in non-archive org buffers."
(when (org-all-archive-files) (font-lock-mode +1)))
(add-hook 'org-mode-hook #'yant/font-lock-activate-maybe)
> your config is impressively [and for me
> dauntingly] comprehensive. the Archiving anchor does not seem to have
> a referent. I searched for archiving, but didn't seem to find what
> you were probably pointing me to.
Sorry, the config is actually not yet formatted for public use. You can
search for the code block containing "defun org-archive--compute-location".
You will need that code block and the following code block.
prev parent reply other threads:[~2021-03-01 3:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 6:22 David Masterson
2021-02-26 7:25 ` Ihor Radchenko
2021-02-26 22:51 ` David Masterson
2021-02-27 6:28 ` Ihor Radchenko
2021-03-01 5:45 ` David Masterson
2021-02-26 7:54 ` Tim Cross
2021-02-26 22:55 ` David Masterson
2021-02-26 22:59 ` Tim Cross
2021-02-27 3:17 ` David Masterson
2021-02-27 4:21 ` Samuel Wales
2021-02-27 6:38 ` Ihor Radchenko
2021-02-26 9:37 ` Eric S Fraga
2021-02-26 23:00 ` David Masterson
2021-02-26 19:24 ` TRS-80
2021-02-26 21:34 ` Samuel Wales
2021-02-27 6:42 ` Ihor Radchenko
2021-02-28 22:13 ` Samuel Wales
2021-03-01 3:42 ` Ihor Radchenko [this message]
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
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).