Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
0answers
26 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
42 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
101 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-...
1
vote
0answers
51 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
41 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
871 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
66 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
60 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
38 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
39 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
185 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
317 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
58 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
148 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
51 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
232 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
74 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
366 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
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
74 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 ...
8
votes
1answer
468 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
114 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
603 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
97 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
58 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
438 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
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
494 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
377 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
105 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
282 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 ...
13
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
580 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
194 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
120 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
145 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
174 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 '("#...
8
votes
1answer
406 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
196 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
681 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
205 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
2k 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 ...
38
votes
1answer
12k 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 ...