Questions tagged [performance]

is for Emacs performance-related issues. Use additional tags to indicate which aspects of Emacs the performance issue is about: startup, navigation, search, screen updates, compilation, execution, debugging, and so on.

Filter by
Sorted by
Tagged with
1 vote
0 answers
24 views

Company Reftex slow when searching for labels

I am writing on a large LaTeX Document using Emacs with AUCTeX, RefTeX and Company for autocompletion. RefTeX for citations is working fine and finds my bibliography entries really fast. However, when ...
2 votes
1 answer
47 views

Why is navigating in large `*shell*` buffer so slow?

For convenience (at least so far) I am running my program that produces a lot of debug output in Emacs shell. However I have a problem: Sometimes (not all the time) moving the cursor (up, down, left, ...
  • 173
1 vote
1 answer
101 views

Slow start-up in MS Windows and relation to the Windows registry

I am using Doom in MS Windows with Emacs 27.2. I am experiencing some very slow start-up times (I included the output of benchmark-init/show-duration-tree at the end). Also, the first actions I ...
0 votes
0 answers
70 views

Debugging Issue: After Updating Emacs Input Lags Massively

After updating Emacs, I am seeing incredibly lagging input performance. I thought the slowness was due to LSP, but it seems to persist even when I disable LSP-mode. Unless I disable all major and ...
  • 101
1 vote
0 answers
108 views

Scrolling through rust-lsp suggestions is very slow. How to go about debugging this?

I'm trying to set up Emacs with rust-lsp ( following this guide). The suggestions from the rust-analyzer are being picked up as you can see in the screenshot. But when I attempt to scroll through them ...
  • 113
0 votes
0 answers
36 views

What is causing slowness when pasting text to terminal emacs (emacs -nw)?

For work, I run terminal emacs inside tmux on a remote server, which I access via PuTTY on a Windows machine. (So far, I haven't found a better way to pickup where I left off when editing remote code.)...
  • 1
0 votes
0 answers
68 views

Magit is slow in a repository with many merge commits

This is one of the many company's repositories, and the apparent difference between this one and many others that work more or less fine is that it has a huge number of merge commits. The way CI is ...
  • 11k
0 votes
1 answer
301 views

Emacs / Doom emacs taking a lot of memory

I'm using Doom Emacs, which is taking a lot of Memory if my browser is opened with 10 tabs. What can I do to reduce amount of memory being used, without sacrificing the packages? My config.el is as (...
1 vote
0 answers
97 views

Really slow editing long org-mode blocks

When editing inside a long org-mode block (#+BEGIN_.... - #+END_....) Emacs is really slow (it can take several seconds to write a single character), while editing the rest of the buffer takes normal ...
  • 241
2 votes
1 answer
286 views

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

When I use Emacs it seems fine mostly, but since recently every couple of minutes it becomes extremely slow for a while. When I change focus to another app, and come back after a while, it is ...
  • 183
3 votes
1 answer
494 views

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

Basically sizeof for lists, hashmaps, etc., with nested structures. I could of course disable garbage collection and then compare numbers from memory usage functions before and after allocation, ...
  • 352
0 votes
1 answer
122 views

Can't disable font-lock-mode

If I have font-lock on and I do M-x find-library RET simple RET, I have colours: If I then M-x font-lock-mode to disable the mode, the colours disappear in the currently-visible portion of the buffer:...
  • 630
5 votes
1 answer
68 views

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

I have been trying to make the start-up times better. Almost all of my init.el is broken into use-package declarations like this: (use-package x ...) (use-package y ...) (use-package z ...) I want to ...
  • 805
1 vote
0 answers
41 views

Package autoloading and use-package

I'm a beginner on emacs and I don't understand packages autoloading and use-package. I see a lot of configs online which use 'use-package' and recommends installing packages with package manager (...
  • 11
1 vote
0 answers
181 views

How can one debug a situation when emacs is unresponsive on Windows?

There is an operation in my setup which makes emacs unresponsive with high CPU. I checked the emacs process with process monitor, but it does not wait for an other process, so I guess it must be ...
  • 1,068
1 vote
1 answer
400 views

What is causing Emacs remote shell to be slow on completion?

So basically I am doing the following: Opening a dired buffer with tramp on a remote. Opening a shell on the remote (M-x shell) Then if I try for example to type any command such as ls -la the ...
1 vote
1 answer
212 views

Slow markdown-mode as Emacs spends lots of time fontifying

Emacs on my Mac got upgraded when I upgraded some other package in Homebrew and now working with Markdown files is very slow. I'm now running the railwaycat/emacsmacport/emacs-mac package version with ...
  • 301
1 vote
0 answers
325 views

EWW very slow opening of certain pages

This question was asked on stackoverflow. Just cross posting it here for better visibility. I am too facing the same issue. I'm using EWW Emacs browser for opening various remote pages(mostly ...
  • 93
2 votes
0 answers
42 views

Is (forward-char N)'s runtime complexity O(N)?

Internally, the text of a buffer is stored as a char array. The encoding used is based on UTF-8, which may use a variable number of bytes to represent different code points. Does the variable-length ...
2 votes
0 answers
191 views

How to speed up `undo-tree-visualizer-toggle-diff` and stop tree movement when cursor is not pressed?

After opening undo-tree-and-diff and enabling undo-tree-visualizer-toggle-diff by pressing d; I start to move in the history tree: If I just press up or down cursore for few seconds ; undo-tree keeps ...
  • 1,072
3 votes
2 answers
1k views

Improve emacs performance when working on large files

I'm a former vim user that switched to emacs + evil with a still relatively simple configuration with only 36 packages. I'm really happy with the additional functionality emacs delivers, but one thing ...
  • 31
0 votes
0 answers
245 views

Windows File open SLOW

Windows 10 Emacs 27.1 From C-x C-f File Till seeing the file actually open can take almost a minute! Tried emacs instead of runemacs. Also Menu-file-visit All the same I think there's some Mcafee ...
  • 309
1 vote
1 answer
48 views

How to improve ‘jedi‘ package's load time

When I try to use jedi package I get following message in the minibuffer. This feature requires the ‘jedi‘ package to be installed. Please check ‘elpy-config‘ for more information. Elpy Configuration ...
  • 1,072
3 votes
1 answer
71 views

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

I did a test where going to from the end to the beginning of a 50 million length line happens instantly when using beginning-of-line. I wonder if this is because it is a C primitive or because Emacs ...
1 vote
1 answer
161 views

How to diagnose emacs running at 100% cpu

I'm having a problem where occassionally emacs will run at 100% cpu, and just hang forever. I've attached gdb to the process, and this is the stacktrace: #0 0x00007fc210e5c5bb in pthread_sigmask () ...
1 vote
1 answer
108 views

How to measure the performance of the mode-line?

Currently when making changes to the mode-line, I try to write efficient elisp, However I don't know for sure if what I'm doing is in fact efficient. How could I test the mode-line performance? For ...
  • 7,431
0 votes
0 answers
73 views

emacsclient spending a lot of time resetting faces

When I launch emacsclient or make a new frame it spends ~2s in: - make-frame 312 42% - frame-creation-function ...
2 votes
2 answers
2k views

Long Emacs start-up time (20~60s) on Windows 10

I have a working setup of emacs on Windows 10 that I like so far. However, I find that emacs start-up takes very long. It can be anywhere from 20s to 60s. I tried installing the benchmark-init package ...
  • 113
0 votes
1 answer
194 views

How to throttle or debounce an elisp method?

I have a very file system intensive function that's being called many times a second. Wish to slow things down a little, anyone knows a way to throttle that function call in elisp? [EDIT - 04/12/20]: ...
1 vote
0 answers
156 views

Poor performance with Tabbar

Tabbar is refreshing groups like 14+ times at once (probably number of tabs) and causing severe slowness with the mods I made on it (lots of IO to sort tabs in mod time). What is the preferred way to ...
0 votes
1 answer
144 views

Throttle transient-mark-mode highlighting?

When I'm using remote X forwarding to run X toolkit emacs and I press C-SPC and move the cursor around, things get very slow. The emacs profiler says all the time is spent in line-move-visual, but I ...
1 vote
1 answer
616 views

Why is emacs so bad at rendering long strings of text and what can be done to make it good?

Whenever a long string is to be rendered in an emacs buffer, which usually happens in the shell, emacs hangs and freezes, or takes too long to render the text compared to the terminal. What can be ...
1 vote
0 answers
349 views

Debugging slow find-file performance

Trying to figure out why find-file (C-x C-f) operations are taking a long time on Windows 10 with emacs 26.3. I tried to do profiling and got following results. - command-execute ...
2 votes
1 answer
58 views

Troubleshooting a hanging `list-processes`

Normally I'd use M-x list-processes to see what Emacs is running in the background. But in this case list-processes itself hangs. What is the right thing to do in this situation?
5 votes
2 answers
139 views

How to pipe large files through fold before opening?

On a regular basis I need to open files that have really long lines, which unfortunately causes emacs to grind to a halt. My understanding is that this is a long-term issue with the renderer. I've ...
1 vote
0 answers
72 views

Performantly filter against a custom time-like property

My agenda view processes many items with SCHEDULED and DEADLINE fields, and fully generates from scratch in about 0.3s. However, if I append CUSTOM_SCHEDULED<"<now>" to my agenda view ...
1 vote
1 answer
239 views

Installation of Org-ref slows down start-up

I am super new to Emacs. I just followed the installation section of org-ref. I managed to get a simple citation working by adding bibliographystyle:plain to the file. This is one of the solution one ...
1 vote
0 answers
50 views

How are unrelated modes enabled?

I've been an emacs user for about a year now and I use it for Haskell programming. I chose to go the vanilla emacs route and customized a plain init file as I went along. Over time, however, I ...
  • 121
1 vote
0 answers
592 views

Remove scrollbar, faster

I like a clean interface. One without the clutter of scroll bars, or menu bars. So, to remove them, I have the following in my init.el (progn (menu-bar-mode -1) (scroll-bar-mode -1) (tooltip-...
6 votes
1 answer
2k views

Find cause of cpu-usage?

Is there some way to find out, what in Emacs is causing spurious cpu usage? Since a few days I notice Emacs retaining high CPU usage despite not being used actively, having no subprocesses, and not ...
  • 1,501
2 votes
1 answer
126 views

Fastest way to draw pixels in Emacs

I'm currently working on a CHIP-8 emulator. This platform requires me to draw 64x32 black/white pixels, ideally at a speed between 30 and 60 frames per second. There's an extension to it that ...
  • 21.2k
4 votes
0 answers
1k views

byte-compile much slower in X (vs. -nw)

Setup Windows 10 host with X server (VcXsrv) Linux guest (Arch) in virtual machine (VMware) Benchmark (defmacro measure-time (&rest body) "Measure the time it takes to evaluate BODY." `(let ...
  • 989
1 vote
2 answers
79 views

When local variables are "calculated"?

Does elisp calculate values of local variables at declaration or when calling them? Say i want to find out what headlines in buffer are lvl2, and do stuff to them: (defun map-org-heads () (org-...
1 vote
0 answers
160 views

C++-mode indenting performance depends on length of previous function?

Using c++-mode in emacs23. UPDATE: In response to some early comments, I tested on emacs24 and emacs25, and see exactly the same behavior. I don't have convenient access to emacs26 or emacs27 (25 ...
2 votes
1 answer
66 views

Is it possible to disable magit calling :git branch --remote --contains <foo> when doing an interactive re-base?

I'm running on fairly large repository (Gentoo's portage, 2.5G .git) and slightly slow hardware (1Ghz arm64) and interactive re-basing is very slow. It seems the main culprit is "git branch --remote --...
  • 4,556
0 votes
1 answer
100 views

Profile performance for a given command

Say I create a quick keyboard macro, but find that executing it in quick succession is extremely slow. How can I determine in what functions or packages this command is spending most of its time? ...
  • 452
4 votes
2 answers
779 views

How to eliminate excessive filesystem accesses that are slow over sshfs?

I am trying to make Emacs work faster over sshfs. It is currently quite slow in opening files, saving files, and sometimes when starting editing. I used sshfs's debugging mode to track the ...
  • 143
4 votes
1 answer
887 views

Magit commit is slow even for tiny changes

For the last few months, committing even tiny changes using magit (c c) is really slow to bring up the commit message buffer. I've profiled the code that is executing during that time but I'm not ...
  • 143
8 votes
4 answers
7k views

Speed up Emacs start-up time

I have seen this thread but my problem is an order of magnitude larger. Also, a newbie, I did not understand much of what was being discussed there. So, this new question. I am running Emacs 25.2.2 ...
  • 1,712
1 vote
0 answers
200 views

Performance issue of c-mode

When I'm pressing C-p/n moving the cursor around, the redisplaying is quite lagging. A profile of CPU give + command-execute 527 59% - ...