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
0answers
24 views

Emacs is extremly slow on battery, normal on power

I have a weird problem where my emacs setup is extremely slow (as in takes a long time to show typed characters) when my laptop is running on battery. Once I connect it to power, the speed is normal. ...
1
vote
0answers
37 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 ...
0
votes
1answer
25 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?
0
votes
0answers
10 views

Memoize with cache on filesystem persisted between sessions

The memoize package provides a memoize wrapper that installs a memoized function over the original functions. (memoize 'expensive-function) will replace expensive-function in place with a memoized ...
4
votes
2answers
66 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
61 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
69 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 ...
0
votes
0answers
39 views

Emacs stops displaying typing until focus moved out of and then back into editor window

I'm currently running RHEL 7.6 and whatever version of emacs comes with it (I don't have access to my system at the moment so can't provide the version number). Sometime in the last 2 weeks my sys ...
1
vote
0answers
45 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
193 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-...
2
votes
0answers
236 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
66 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
952 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
68 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
79 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
43 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
53 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? ...
3
votes
2answers
275 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 ...
2
votes
1answer
456 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 ...
6
votes
4answers
2k 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
77 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% - ...
19
votes
2answers
3k 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
302 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
62 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 ...
4
votes
1answer
324 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
86 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
431 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 ...
17
votes
1answer
2k 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 ...
0
votes
0answers
104 views

Why is avy-goto-line so slow?

If I open a file with, say, 2 lines, then when I call avy-goto-line emacs shows me in the beginning of each line the keybinding to move the cursor over there. But try it in a bit longer file (I use a ...
9
votes
1answer
696 views

unicode.txt slowness

Moving around point (using the cursor keys) in Xah’s unicode.txt in fundamental-mode is noticeably slower than in an ordinary text file. Are the many non-ASCII characters the issue? Anything else? ...
3
votes
0answers
141 views

csv-mode is very slow

Just about any buffer with csv-mode enabled gets very slow/unresponsive, regardless of how big the file is. It takes up to half a second to jump to the next line/character. Any idea why that is? I ...
8
votes
3answers
862 views

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

Even using default settings (emacs -Q) I've found large C files can be slow to scroll with Emacs. If for example, I open a large file and hold Page-Down. It will scroll down 1-2 pages, then hang for ...
2
votes
0answers
113 views

hide-show with linum

When working on huge files, it seems that when hide-show collapses a large multi-line block, linum still creates hidden overlays for every line in the hidden block leading to unresponsive emacs. Is ...
2
votes
0answers
65 views

how can I debug or fix slowness in org-cycle?

running org-cycle appears to hang sometimes. I've run M-x profiler-start <tab> ;; bound to org-cycle C-g ;; to cancel apparently-hung command M-x profiler-report and I see that a bunch of time ...
2
votes
2answers
571 views

Why emacs multiplication performance is so bad?

I compared two versions of loop in emacs and in C. Emacs byte-compiled version gives 4.5 seconds, C version gives 0.22 seconds. Why so slow? How to optimize it? Emacs version: ;; -*- lexical-...
8
votes
2answers
1k views

org-babel result to a separate buffer

I use org-babel to generate some reports which can't be automatically processed, and since org is a good outline format, I print the results in org to represent them as trees. I've noticed that ...
0
votes
1answer
569 views

why tmux under ansi-term so slow?

I use colorized output in ghci. And if run it: in comint-mode, or in eshell, then colors displayed fine, but a lot of escape sequences displayed like ^A^Bλ ^A^B> ^A^B^B. in ansi-term, then I got ...
5
votes
0answers
467 views

Ways to make Emacs feel snappy as Vim? [closed]

When I switched to Emacs from Vim, I really loved the extensibility of Emacs. But compared with Vim, Emacs still feels somewhat sluggish. Especially when I moved my pointer/cursor around, and typing ...
1
vote
1answer
113 views

Cancel printing of long string in buffer

Sometimes when in e.g. a Python or SQL buffer I accidentally evaluate something that outputs e.g. multiple megabytes of text into the buffer. >>> zps = _read_zipfile_container(br.response()....
1
vote
2answers
349 views

s3fs is too slow for emacs

I have set up a mount point using the s3fs FUSE filesystem and autofs to talk to an Amazon S3 bucket, but it is excruciatingly slow to edit a file in the bucket in emacs - it is basically unusable due ...
14
votes
2answers
4k views

Magit extremely slow in Windows. How do I optimize?

I am forced to use Windows 10 for a project. Yes, I would rather use GNU/Linux. To keep my sanity, I've tried to regard Windows as a bootloader for Emacs :) Unfortunately, Magit (one of my favorite ...
4
votes
1answer
662 views

is 64 bit Windows actually faster?

Installing Windows 64 bit for Windows 7 is currently a massive pain Where is official 64-bit Emacs for Windows? (The manual said there is!) because although there are many roque cuts, GNU are not ...
3
votes
3answers
199 views

Emacs slows to a crawl when Chrome is running

Really bizarre issue here; I suspect it's X-related. This may be better suited to the Linux/Unix SE, but I figured there might be more domain-specific expertise here. Often (but not 100% of the time)...
3
votes
0answers
128 views

Profiling org-mode init file

My initialization file is organized in org-mode with src snippets. Is there a way I can profile it to see which snippets take the most time to evaluate? When my initialization file was in Elisp, I was ...
4
votes
2answers
69 views

avoid emacs to lock down or crash when used for many tasks

I consider to start using emacs for IRC, SQL, Shell and maybe twitter and Feed reading. But than I wonder how power users of emacs deal with emacs being single threaded. So if I have one long-running ...
3
votes
1answer
216 views

Debugging open file handles in emacs

Is there a way I can find what file handles emacs has open, and close these references? Or even better, find where they are being open? Emacs is keeping handles to a large number of files (a leak) ...
2
votes
1answer
193 views

Setting faces is slow?

I'm seeing rather bizarre behavior. I have the following code: (defun set-mode-line-face () (let ((color (pcase (random 6) (`1 '("#586e75" . "#eee8d5")) (`2 '("#...
10
votes
1answer
468 views

`looking-back` performance

I have some code using (looking-back … (line-beginning-position)). Doc string of looking-back states that it's better to avoid this function because of slowness. I'm curious will following approach ...
2
votes
1answer
212 views

Size of process output sent to filter functions

I'm using comint to communicate with a REPL. From time to time the REPL sends large amounts of data. This causes a significant lag (about one second), because my filter function gets called on a ...
6
votes
0answers
746 views

How to find what causes ESS to run very slow?

When working with an iESS session of R and an R file open side-by-side, I noticed extremely slow performance when typing indetifiers. Typing braces and operators is fine, however, when an identifier ...