* Speedup on large file after reconfiguring whitespace-mode
@ 2024-07-30 13:12 Russell Adams
2024-07-30 16:02 ` Fraga, Eric
0 siblings, 1 reply; 2+ messages in thread
From: Russell Adams @ 2024-07-30 13:12 UTC (permalink / raw)
To: emacs-orgmode
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-30 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30 13:12 Speedup on large file after reconfiguring whitespace-mode Russell Adams
2024-07-30 16:02 ` Fraga, Eric
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).