6 ms·
How do you get a reasonably fancy Emacs to start up/open files quickly? Every time I try to get into EMacs after adding a few packages it becomes painfully slow
by jitl 3y ago
How do you get a reasonably fancy Emacs to start up/open files quickly? Every time I try to get into EMacs after adding a few packages it becomes painfully slow to open a file for editing. Then I try to understand Emacs server, then I fail / give up and go back to vim.
- lynx23 3y agoI was about to answer "Use emacsclient", but then I realized you can't be bothered to configure it. For me, putting "(server-start)" into .emacs was always enough, but YMMV.
- PH95VuimJjqBqy 3y agoyeah, I can't deal with the emacs startup. I mean, it's not slow per se, but compared to vim it's noticeably slower so I can't deal with it.
- cyruseuros 3y agoThe way the other guy said. Then it breaks enough times, you give up, and switch to Helix. Nothing snappier out there (vanilla Vim included) and it comes with all the goodies you'd install 100 packages for (DAP, LSP, treesitter, sane default configs for dozens of languages) To each their own, but for a hardcore Emacs user (wrote a number od my own plugins) that actually tried and couldn't seriously adopt VSCode for more than a few months, Helix was such a nice surprise + change of pace. Worth giving it a shot if you're caught in that gap.
- shanusmagnus 3y agoIs there something that approximates org-mode outlining? I don't need all the other stuff org-mode does, but just the simple outliner functionality combined with all the other Emacs stuff is my golden handcuffs.
- cyruseuros 3y agoNot that I'm aware of just yet, unfortunately, so might be a good reason to stick around. For me the switch coincided with jumping on the zettelkasten train and I haven't looked back since. I miss some org mode fratures but constantly `org-refile`-ing I can do without.
- willdr 3y agoOpen it at 8am, close it at 8pm
- AlexCoventry 3y agoEmacs server is quite straightforward. M-x server-start in a running emacs, then emacsclient <filename>. emacsclient -c if you want to open the file in a new window, or emacsclient -t if you want to open it in your current terminal. C-x # when you're done editing the file.
- euroderf 3y agomyhome>> emacs --daemon
- oarsinsync 3y agoemacsclient -ca '' Connect to the daemon if it’s running, start it if it’s not. alias emacs="emacsclient -ca ''"
- ideasman42 3y agoI've been using emacs as my main editor for years now and don't find the startup speed to be an issue - to the point I've never bothered with emacsclient: It starts up with ~77 packages in half a second. This is my config. https://gitlab.com/ideasman42/dotfiles/-/tree/main/.config/emacs?ref_type=heads https://gitlab.com/ideasman42/dotfiles/-/tree/main/.config/e...
- benreesman 3y agoThat’s pretty close to what I’ve been running on the GC tuning but I like parts of your spelling better. This is going MIT as part of a bigger project in about a month (think Lucid s/C++/modern models/). If I inline attribution you mind if I borrow this or that?
- mkesper 3y agoUse doomemacs for a start. It really optimizes startup time and offers vast included modules as well as great package management. https://github.com/doomemacs/doomemacs/blob/master/docs/getting_started.org#package-management https://github.com/doomemacs/doomemacs/blob/master/docs/gett... Oh and for Windows, WSL2 seems to be the fastest: https://github.com/doomemacs/doomemacs/blob/master/docs/getting_started.org#on-windows https://github.com/doomemacs/doomemacs/blob/master/docs/gett...
- Evidlo 3y agoSo buggy for me.
- benreesman 3y agoDoom is a great start for a low-friction, extreme quality curated emacs setup. +1
- kaeland 3y agoAnother +1 for using DOOM emacs.
- benreesman 3y agohttps://imgur.com/a/i99Nisn https://imgur.com/a/i99Nisn 1.4 seconds for 100 packages, half of which are on probation? My (and soon `HYPER//MODERN`'s) package set is under heavy construction, I'll be sad if I don't get it under 300ms including loading and rendering a logo at 6k from a cold disk which that was. Rust is a perfectly good language for writing tight code, but those `emacs` inner loops have been tuned by hard-ass pros for 30+ years in straight C, which is plenty fast too. Even the best Rust code doesn't have that kind of tuning in. `emacs` is fucking fast.
- estebank 3y agoWith no intention to push back on Emacs being highly optimized, age of an application is not an accurate proxy for level of performance. If it were, grep would be faster than ripgrep. New software can apply optimisations discovered over the previous 40 years, and leverage architectural designs with different assumptions, like the GC limits in Emacs discussed elsewhere in the comments. Older applications can apply those same optimizations, but it's not a given that they will, and changing their architecture can be daunting, for sometimes unknown benefits.