From: Russell Adams <RLAdams@adamsinfoserv.com>
To: emacs-orgmode@gnu.org
Subject: Speedup on large file after reconfiguring whitespace-mode
Date: Tue, 30 Jul 2024 15:12:50 +0200 [thread overview]
Message-ID: <Zqjm0hyy5DjFNrgm@swain.home.arpa> (raw)
I wanted to let others know about my recent experience tuning Org. I'm
on Emacs 29.3 with Org 9.7-pre from git.
I have a large file, 5MB, 134k lines, 4k example blocks, 1200 inline
images, 6500 timestamps. It grows rapidly as I use it for customer
support at a very active customer. I do try to archive completed tasks
twice a year to try and get it back under 100k lines.
I've had some performance problems with the file as it grows. Recently
I was trying to scroll up by just holding page up, and within seconds
Emacs would timeout and it could take up to 10 seconds being frozen
until it caught up.
I asked about this in the recent Org meetup, and I was given great
information about how the number of faces used in a file can strongly
influence the speed of navigation. I tested in fundamental mode and
still had slowdowns, and in emacs -Q it ran normally at full
speed. Something was up with faces.
I went to bisect my configuration. I don't use many packages, but I
dutifully bisected down all my use-packages calls until I had
none. The problem still persisted with no add-on packages.
I started digging into my configuration, and found that if I disabled
global-whitespace-mode the issue vanished. After some searches, it
appears that whitespace-mode highlights each space/tab/newline with a
face. In a small file that may not matter, but in bulk it was
crippling.
I changed whitespace-mode to use the display table where it
substitutes other characters for spaces instead of using faces, and the
performance problem was solved.
The following setting made all the difference:
(setq whitespace-style '(space-mark tab-mark))
Perhaps I can save someone else some time troubleshooting.
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
https://www.adamsinfoserv.com/
next reply other threads:[~2024-07-30 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 13:12 Russell Adams [this message]
2024-07-30 16:02 ` Speedup on large file after reconfiguring whitespace-mode Fraga, Eric
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=Zqjm0hyy5DjFNrgm@swain.home.arpa \
--to=rladams@adamsinfoserv.com \
--cc=emacs-orgmode@gnu.org \
/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
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
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).