Skip to main content
Share Your Experience: Take the 2024 Developer Survey
17 votes
Accepted

unicode.txt slowness

Reading the GitHub discussion thread linked in @wvxvw’s comment, I discovered the variable inhibit-compacting-font-caches. Setting it to non-nil solves the issue: (setq inhibit-compacting-font-caches ...
feklee's user avatar
  • 1,079
17 votes
Accepted

How can I improve startup time despite many packages?

One of the design choices in package.el was to try and make things "simple". Part of this is that package-initialize searches for all the packages that are installed, then tries to figure out which ...
Stefan's user avatar
  • 26.5k
14 votes

Speed up Emacs start-up time

Whatever your .emacs and its improvements, you also should consider running emacs as a server at your session's opening : emacs --daemon Now, running emacs with emacsclient -t or emacsclient -...
david's user avatar
  • 273
12 votes
Accepted

How to avoid scrolling with large files hanging for short periods of time? (holding page keys for example)

As you noticed, this basically happens when the redisplay is too slow for some reason. There's not much we can do in the general case (when it's "much too slow") but when it's "just a tad bit too ...
Stefan's user avatar
  • 26.5k
9 votes
Accepted

org-babel result to a separate buffer

I've looked through documentation but it seems like there's no such option. Surprising that org does not offer :output buffer option. Maybe this is in the works for future org versions. ... place ...
Emacs User's user avatar
  • 5,653
8 votes

Speed up Emacs start-up time

1) I have found esup to be a very convenient for Emacs startup profiling. You just run M-x esup and get back list of all expressions in your init.el sorted by the time they took to execute. You don't ...
Zaript's user avatar
  • 81
8 votes
Accepted

Find cause of cpu-usage?

@npostavs' last comment should give you enough hints to solve the problem. The built-in profiler can tell which function is causing the high CPU usage. Here are simple steps to get started: M-x ...
Heikki's user avatar
  • 3,076
8 votes
Accepted

Is there any way to get the memory size (usage) of a Lisp variable/value?

Is there any way to get the memory size/usage of a variable? Emacs 28 adds a more fine-grained memory usage reporting command than was previously available: ** New command 'memory-report'. This ...
Basil's user avatar
  • 12.5k
7 votes

TRAMP is unbearably slow (OSX, ssh)

I know it's an old question and that you maybe don't care about the answer now but I do faced the same issue. I was pretty sure it was OS X related but in fact lags and timeouts were caused by my ...
Bounga's user avatar
  • 81
7 votes

How do I prevent extremely long lines making Emacs slow?

I created my own solution for this problem here: https://github.com/rakete/too-long-lines-mode I was not satisfied with phils solution which switches a buffer with very long lines to fundamental-mode,...
Andreas Raster's user avatar
6 votes

How can I troubleshoot a very slow Emacs?

In addition, there is also a potential factor that will significantly slow down Emacs: Font Configuration. It may sound amusing, but it really matters. If there are lots of non-Latin characters that ...
lhy7889678's user avatar
6 votes

How can I improve startup time despite many packages?

The problem you describe about package-initialize taking so much time to load is a well known problem. It is also one of the problems that some emacs frameworks try to solve by loading the autoloads ...
UndeadKernel's user avatar
6 votes

Speed up Emacs start-up time

Side note, it is generally considered a good idea to have your startup code in ~/.emacs.d/init.el rather than ~/.emacs, one less hiden file in your home directory, a suffix so that other editors can ...
icarus's user avatar
  • 1,924
6 votes
Accepted

Is there an efficient way to tell which parts of my startup of Emacs take the longest to load?

This does it: (setq use-package-verbose t use-package-minimum-reported-time 0) We get in *Messages*: Loading package x...done (0.021s) Configuring package x...done (0.020s) Loading package y......
scribe's user avatar
  • 1,035
5 votes

org-babel result to a separate buffer

Since I've accepted the answer I've been living with that 'have elisp snippet for each report I want' setup for a while. But then I've came up with the following trick: There is a way to open org-...
Roman Grazhdan's user avatar
5 votes

How do I measure performance of elisp code?

In addition to @Malabarba's answer, note that you can measure the compiled execution time of your code with benchmark-run-compiled. That metric is often much more relevant than the interpreted ...
Clément's user avatar
  • 3,995
5 votes

How do I stop Emacs micro-stuttering and high CPU utilization caused by background calls to git?

Solution The problems turned out to be caused by the customization variable auto-revert-check-vc-info. If this setting is active, the version control software – git in my case – will be invoked ...
kdb's user avatar
  • 1,561
5 votes
Accepted

Magit commit is slow even for tiny changes

Do you really need all of those branches locally? If not, then it might be a good idea to only track the interesting ones. Such an unusually large number of branches will also affect other things. To ...
tarsius's user avatar
  • 25.8k
5 votes

How to pipe large files through fold before opening?

Have emacs read from stdin device and insert contents into *scratch* buffer. $ fold -w80 myfile | emacs --insert /path/to/stdin Note: You will need to update /path/to/stdin path e.g. $ fold -w80 ...
Melioratus's user avatar
  • 4,678
5 votes
Accepted

What is the runtime complexity of using beginning-of-line?

The underlying function is find_newline in emacs/src/search.c. It uses a cache of sections of text that contain no newlines, so the function can skip over them quickly. The cache is controlled by the ...
NickD's user avatar
  • 30.6k
4 votes

Improve emacs performance when working on large files

Try: M-x profiler-start and select cpu from the prompt do the thing that is slow M-x profiler-stop M-x profiler-report Look for the cpu hogs and drill down in to them by hitting TAB on them to ...
izkon's user avatar
  • 1,878
4 votes
Accepted

Emacs is slow, intermittently hangs, freezes when I "come back to it", profiler says `savehist`

Check your history file: ~/.emacs.d/history. If it is very large (> 10 MB), quit Emacs, then delete it. Credit to https://reddit.com/r/emacs/comments/5krh9b/...
hraban's user avatar
  • 211
3 votes
Accepted

magit with tramp is slow

I try to dig deeper into this problem by setting (setq tramp-verbose 10). Here is one possible step for reproducing the slowness: git clone https://github.com/openjdk-mirror/jdk7u-hotspot.git on ...
zwy's user avatar
  • 141
3 votes

Emacs on Windows 7 very slow when computer is outside company network

I had the same problem, and it seems like it is being caused by the windows netlogon service. The simplest solution is to turn it off when outside your company network, by running the following ...
arvidj's user avatar
  • 65
2 votes

Emacs on Windows 7 very slow when computer is outside company network

Quite a few possible reasons, two off the top of my head (had these troubles in the past.) You may have a remote folder mapped in Windows, and when off the local network it may slow you down a lot (...
Yuri Steinschreiber's user avatar
2 votes

How do I prevent extremely long lines making Emacs slow?

Emacs 29 will feature improvements in that area. A lot of that is optimizing the display engine subroutines to work better with longer lines. Better algorithmic complexity, I imagine.
Dmitry's user avatar
  • 3,803
2 votes

How do I prevent extremely long lines making Emacs slow?

Although the question asks for how to handle long lines in a file, I often experience this problem when working with a buffer such as a command interpreter, or comint (e.g. shell). It may be possible ...
Lorem Ipsum's user avatar
  • 4,517
2 votes

How do I prevent extremely long lines making Emacs slow?

In my Emacs setup I have a mode with custom fontification, i.e. where I set font-lock-defaults. A single page down would use 30 seconds to display part of 30000 character line. This slow down was ...
Axel Bregnsbo's user avatar
2 votes

How to find what causes ESS to run very slow?

I know this is 5, almost 6, years late. The last response is from January of this year though. There's been a recent development that might solve the issue for people in the future. It turns out that ...
MentatOfDune's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible