5 ms·
What is your hardware? How fast is your Emacs? Ryzen 3700K here: time emacs -nw -Q -eval '(kill-emacs)' <- no GUI, no config file at all 0.086s in m
by TacticalCoder 4y ago
What is your hardware? How fast is your Emacs? Ryzen 3700K here:
time emacs -nw -Q -eval '(kill-emacs)' <- no GUI, no config file at all
0.086s in my case (86 milliseconds) and I think that's relatively slow compare to machines others have here (5900X / 12th gen Intel / M1 macs etc.).
Then:
time emacs -eval '(kill-emacs)'
1.4s (loading a very big custom Emacs setup).
Are you using the native-comp branch of Emacs?
Are you using a native JSON parsing lib? (not sure if it helps to open JSON files themselves but it speeds up LSP greatly, for LSP uses JSON files).
> Is this something I could avoid or it's unavoidable since Emacs is single threaded?
I don't know about gigantic JSON files but that's very weird to me: I can start working on my Clojure files while LSP is starting. And LSP is definitely starting in another process that is not blocking the Emacs thread.
Emacs may use a single kernel thread but there are lots of things that are done by external processes.
I'm not saying there aren't things that can block Emacs but, in my case, although LSP is still slow to start up, it's definitely not blocking my Emacs (top, for example, shows clojure-lsp running as its own process).
I'm using Emacs since decades and it has never felt faster than nowadays: newer hardware, NVMe SSD, native-compilation branch, integration of ripgrep and fzf (two amazing helper tools that are insanely fast) through ivy/counsel (counsel-rg / counsel-fzf)...
Cherry on top: I now get the LSP servers and although it's not IntelliJ yet, it's much better than any "Emacs" I used in the past.
- rs_rs_rs_rs_rs 4y agoI do have a relatively old processor, i5-4460, but it's not THAT old, fast SSD. I'm only using the nativecomp branch and doom-emacs starts in 1.4 seconds here too. Someone suggested eglot instead of lsp-mode, will give that a try.