2 ms·
> If you start Emacs with `emacs --no-init-file --no-site-file --no-splash` it starts (especially in non-GUI mode) in a fraction of a second. Sure thing, but m
by vemv 8y ago
> If you start Emacs with `emacs --no-init-file --no-site-file --no-splash` it starts (especially in non-GUI mode) in a fraction of a second.
Sure thing, but most real-world setups have multiple heavy packages installed.
> If you then write your init file(s) in a certain way (use autoloads) you can maintain this performance while retainng all your customization.
Worth noting that autoloading is useful up to a point - after a threshold, the gains are only theoretical (your reported startup was 0.1s, but immediately after Emacs startup, it froze 2 seconds because all the autoloads are now doing its work).
In the end when I open Emacs I want a bunch of stuff to happen (open files, color them with syntax, etc) - some work has to be performed sooner or later.
> the workflow with Emacs for those who use it is not to be restarting it all the time.
I start it a few times a day, for not accumulating state, particularly that related with Clojure nREPL connections. Not a costly operation.
- avar 8y ago> most real-world setups have multiple heavy packages installed. Sure, I wouldn't use it in this mode, but this line to the effect of "it takes seconds to start up" is usually uttered by people who are more used to the likes of nano or vi. You can also use those command-line options to start Emacs in that sort of one-off mode. > your reported startup was 0.1s, but immediately after Emacs startup, it froze 2 seconds. That's odd, I can start `emacs --no-init-file --no-site-file --no-splash -nw <file>` and write something to the file, C-x C-s C-x C-c to write + exit with no more noticeable delay than doing the same with mg, nano or vim on my system. This is with Emacs 25.2.2. > I want a bunch of stuff to happen (open files, color them with syntax. Opening a file to have it syntax-colored takes less than second (feels like at most 1/8 of second) in that mode. > I start it a few times a day[...] Doesn't Clojure have some equivalent of M-x tramp-cleanup-all-connections? Occasionally I'll mass-close buffers, but the uptime of Emacs tends to be 1=1 my laptop, usually about a month (for security updates and the like). I believe this mode of use is more typical than restarting it this often.
- vemv 8y ago> That's odd... I meant, for regular usage (with full packages), some people might pride themselves over a 0.1 startup, but then as soon as Emacs does something useful it will freeze a little. > Opening a file... Maybe my example wasn't clear enough. When I open Emacs a lot of functionality will be 'there', as it happens with an IDE. Think of a project tree, terminal, misc functionality, and unavoidable dependencies. > Doesn't Clojure... The Clojure(Script) tooling stack has many layers from different authors, so it's reasonable to not trust things to work after several connect/disconnect cycles.
- mih 8y agoUsers who want fast startup simply load emacs-server once on system startup and run the emacsclient when needed. Emacs starts in a jiffy when done this way. Of course this probably will not help you with resetting accumulated states.