Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
2answers
63 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
47 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
36 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
35 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
132 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
228 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
1k 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
52 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% - ...
18
votes
2answers
2k 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 ...
3
votes
0answers
123 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 ...
1
vote
1answer
40 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
190 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
67 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
326 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 ...
15
votes
1answer
1k 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
67 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 ...
7
votes
1answer
367 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
101 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 ...
7
votes
3answers
492 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
88 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 ...
3
votes
0answers
54 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
400 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-...
9
votes
2answers
960 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
470 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 ...
0
votes
0answers
329 views

How to fix Slow emacs access of host mounted drive on Windows 7 under VirtualBox?

I'm setting up a virtual Windows 7 machine on my Mac OSX El Capitan using VirtualBox. The windows 7 install seems to work well, however, when launching Emacs 24.1 it is extremely slow on all file ...
5
votes
0answers
353 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
99 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
260 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 ...
12
votes
2answers
3k views

Magit extremely slow in Windows. How do I optimize?

I am forced to used Windows 10 for a project. Yes, I would rather use GNU/Linux. To keep my sanity, I've tried to view Windows as a bootloader for emacs :) Unfortunately, Magit (one of my favorite ...
4
votes
1answer
542 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 ...
0
votes
0answers
246 views

Why does emacs hang randomly? [duplicate]

Emacs hangs randomly when I launch magit-status I install packages I execute cider-jack-in Sometimes, it doesn't hang, but it often hangs indefinitely. Why? My ~/.emacs ;; -*- mode: Emacs-Lisp; -*-...
3
votes
3answers
188 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
116 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
67 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
122 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
160 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 '("#...
7
votes
1answer
372 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
189 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
640 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 ...
2
votes
1answer
204 views

auto-complete mode performance is awful in nxml-mode

Performance used to be OK, but a couple of weeks ago the performance got much worse. Some experimentation showed that it's auto-complete-mode in XML files. When I type, it now takes a second or two ...
14
votes
2answers
1k views

How to prevent slow-down when an inferior processes generates long lines?

I use Emacs with Geiser to hack on some Scheme code. As I'm playing around in the REPL I sometimes evaluate expressions that result in a lot of output, often all on one line. For example, I just ...
13
votes
2answers
1k views

practical limits on org-mode file size?

I have an org-mode file that's running around 6,000 lines with a hundred or so top-level headlines. It's started to take around a minute to load or save, and occasionally it sends emacs into the weeds ...
36
votes
1answer
11k views

How can I troubleshoot a very slow Emacs?

I am writing a document and I have a problem with Emacs' performance that I think appeared just yesterday. I haven't made any alterations in my init file or installed any new packages. The problem is ...
13
votes
1answer
1k views

Optimizing font lock performance

I want to perform a variant of anchored font lock matching. I have function definitions that start with a list of names, and I want those names to be highlighted inside the function body. I have ...
23
votes
1answer
2k views

What algorithm does sort use?

I need to add a single integer to a list that's already sorted, such that it goes in the right place. My first tought was something like (sort (cons newelt list) #'<) However, given that list is ...
8
votes
3answers
2k views

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

I'm using GNU Emacs 24.3 on Windows 7 and normally I don't have any problems with speed/responsiveness. I'm launching Emacs with runemacs.exe However, when I am travelling and try to connect to my ...
6
votes
1answer
286 views

What are the advantages of building Emacs from source?

I use precompiled Emacs binaries (24.3) right now. AFAIK, v24.4 is already available as binaries, so there is no incentive for me to compile Emacs myself to stay current. I'm thinking, however, ...
7
votes
1answer
1k views

“Making tag completion table” Freezes/Blocks — how to disable

TLDR: I've got a large tags file that loads multiple times per session, making it unusable. Can't find the source of issue or how to disable it -- main goal is to jump to tags, but completion would ...
40
votes
3answers
3k views

What can I do to speed up my start-up?

What are some basic things I could do to reduce the start-up time? Is there anything in particular I should pay attention to, for that matter? Note: Startup time can be mitigated by starting Emacs ...
30
votes
3answers
2k views

Why is `let' faster with lexical scope?

While reading through the source code for the dolist macro, I ran into the following comment. ;; This is not a reliable test, but it does not matter because both semantics are acceptable, tho one ...