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
0
votes
1answer
26 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
0answers
46 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 ...
0
votes
0answers
27 views

How to use thread to work asynchronously in the background?

I've been trying to update this package: https://github.com/leoc/org-time-budgets. It searches your agenda files, sums up clocked time per tags you can specify, and shows a summary at the top of the ...
2
votes
1answer
121 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 ...
0
votes
1answer
59 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:...
5
votes
1answer
59 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 ...
1
vote
0answers
32 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 (...
1
vote
0answers
87 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
vote
1answer
167 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
1answer
140 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 ...
1
vote
0answers
225 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 ...
2
votes
0answers
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 ...
1
vote
0answers
100 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 ...
3
votes
2answers
569 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 ...
0
votes
0answers
76 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 ...
1
vote
1answer
42 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 ...
3
votes
1answer
69 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
1answer
127 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
1answer
87 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 ...
0
votes
0answers
49 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
2answers
1k 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 ...
0
votes
1answer
137 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
0answers
136 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
1answer
109 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
1answer
489 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
0answers
224 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 ...
1
vote
1answer
42 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
2answers
123 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
0answers
68 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
1answer
204 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
0answers
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 ...
1
vote
0answers
460 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-...
5
votes
1answer
1k 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 ...
2
votes
1answer
105 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 ...
4
votes
0answers
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 ...
1
vote
2answers
72 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
0answers
133 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
1answer
57 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 --...
0
votes
1answer
91 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? ...
4
votes
2answers
627 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 ...
4
votes
1answer
774 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 ...
8
votes
4answers
6k 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 ...
0
votes
0answers
184 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% - ...
21
votes
2answers
4k views

How can I improve startup time despite many packages?

TL;DR I have such a huge amount of packages that it's hurting my startup time. If you don't believe that could be the case, read on. My Emacs startup time is quite small. I don't use use-package, I ...
8
votes
1answer
562 views

Speed up org-map-entries when matching by property

Question: Why is org-map-entries property matching so slow, and what can I do to speed it up? Background: I have a relatively simple use for org-map-entries: grab the effort (in integer minutes) from ...
2
votes
1answer
94 views

Magit hunk with long lines set default hidden

When I am using magit and open a a certain commit containing hunks with very long lines (a minified javascript file, css ...), emacs does not respond anymore or it becomes very slowly, luckily still ...
5
votes
1answer
567 views

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

Using Emacs on Windows, I experiences issues due to background invocations of git.exe. The same issues might apply on Linux, though the more light-weight process calling might make them unnoticable. ...
0
votes
1answer
133 views

Speed issue with omnisharp go-to-definition

Getting a rather sizable speed issue with using go-to-definition from omnisharp. Ran the profiler, and received nearly 50% of the cpu time dedicated between: isearch-printing-char and omnisharp-go-...
0
votes
1answer
590 views

Debugging emacs 24.5 slow startup (WSL)

I'm running emacs24-nox on Ubuntu trusty on Windows Linux Subsystem, and I'm trying to figure out why the startup time is slow. I've inspected the startup with strace and found two calls to poll that ...
20
votes
2answers
4k views

Is there any downside to setting `gc-cons-threshold` very high and collecting garbage when idle?

I added the following two lines to the top of my init.el: (setq gc-cons-threshold (eval-when-compile (* 1024 1024 1024))) (run-with-idle-timer 2 t (lambda () (garbage-collect))) That means that ...