Man Emacs Is Slow

5 points by xiaoxing ↗ HN
I have tried vs code recently after a long while. I opened up one of my react projects, instantly blown away by the speed of autocompletion and navigation. Even typing is faster than in emacs. I am using doom-emacs with minimal tweaks right now, and the typing feels sluggish overtime on both source code files and org-mode files. Restart emacs helps sometimes, but even with fresh instance, it still feels a little bit slower than vs code. Which makes vs code feels more like a native mac app and emacs an electron bloatware. That's a shame, I am still an emacs user, but it makes me seriously considering switching, maybe just for JavaScript/TypeScript projects.

7 comments

[ 0.22 ms ] story [ 20.6 ms ] thread
is info emacs any faster?

I use emacs exclusively for org-mode. I think I don't see the problems you see.

Recalculating a table with 1000 rows takes an eternity. :/
Three years in to my daily log, I need to retest this!
AFAIK Emacs is a single-thread application.
I've only noticed this issue, slow to respond to keypresses in regular typing, when using a few (could not identify anymore) language modes. Some of them are really inefficient in the way they're written which shows up when you get a larger source file (not even large, I recall some mode creating problems with anything over about 300 lines of code which is not excessive for a single file in many languages). But normally, using emacs for {cpp, common lisp, erlang, elixir, ada, org, prolog, python}, I've not found it to be slow at all.

I'd dig into what modes (minor and major) are setup on the files you're editing.

I will also say, there was some way I'd once configured org-mode that really slowed it down when there were a lot of code blocks (as it could switch into the appropriate major mode for that block). I don't recall ever "fixing" it, it just got faster over time. I was specifically using org for literate programming. When using it straight with primarily the outliner, dates, todo lists, etc. it didn't have the same issue.

Are you on Windows? I've heard Emacs is rather bad on Windows in terms of performance.

The one thing I've noticed that really helps with load times is running emacs as a daemon on startup and launching new instances with ```emacsclient -nc```. But that doesn't address issues while it runs.

No, I am using a pretty beefy iMac. It’s not start time that I am concerned about, I tend to keep it open for a long time. It’s the mushy feeling when typing, or when some relatively “heavy” commands (projectile, search etc.) blocks the whole thing for a brief moment. It’s totally useable, but you can really tell the difference when compare it to other mainstream editors.