Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I use vanilla Emacs with 145 packages and my startup time is 0.9 sec on a 6 y/o thinkpad. With deferred evaluation, there is no need to use a daemon.


sort by: page size:

I wonder why everyone's having such long startup time for emacs - like 6 to 8 seconds. Mine has a lot of add-on packages and it still manages to start up in 2 seconds (It's a server. So that happens only once in a session). I haven't done much optimization either - unless you count a lot of autoloads that you automatically get with use-package.

Agree -- but doesn't strike me as a big deal. For me, emacs is something I start and will often have running for months. 5 second startup time is irrelevant. That's no slower than starting Word or Excel, either. Even browsers take a couple of seconds to start from cold.

This. This emacsclient startup time is excellent. The complaint that each launched client shares the same buffers is hardly sufficient to justify the effort of lazy loading to achieve only mediocre performance.

On the other hand one I don’t really care about init time at all and I think many users don’t care for the same reason. I start Emacs after a reboot (roughly once every three weeks) so even if it takes a minute to start, I would be optimising ~0.01% of my Emacs-using time. If it took ~60s and I reduced that to 2s then this optimisation would save less than 1.5hours over five years. But also that Emacs-starting time is spent reading email not waiting for Emacs so it wouldn’t bother me much if it took ~10min

A no-config Emacs has a rapid startup time - it's instant on my PC.

> or an acceptance of “fit your workflow around Emacs” than it is truly a solution, which would be to reduce startup times.

I don't see a problem with this. Emacs is a general purpose platform, and it's silly to expect really fast startup times if you're using it as a general purpose platform. People aren't expecting Linux to have an instant startup time if you have a large number of services running - why expect it from Emacs?


If startup time is the issue, you can use emacsclient for near instant starts.

well, that's for terminal mode. With a window manager, most application has similar start up time which I assume is caused by similar xorg routines being run.

However, running Emacs in daemon mode does reduce this to instant. Not sure why this is.


If you load a bunch of packages at startup that take several seconds to load that is as good a benchmark as any. I have this at the end of my init.el:

    (run-with-idle-timer
     3 nil
     (lambda ()
       (let ((inhibit-message t))
         (message "Emacs ready in %s with %d garbage collections."
                  (format "%.2f seconds"
                          (float-time
                           (time-subtract after-init-time before-init-time)))
                  gcs-done))))

If you want fast startup times, just live in emacs, keeping multiple shells alive underneath. You can build yourself a whole clojure repl that just lives there all the time (startup once), and a bash or whatever you like as well.

Startup time is bad, yes, but I think it’s a reasonable trade off for the features I get and plus I tend to launch it once and then open files with the command line tools, which is basically instant. Granted I’m spoiled on my personal machine with a six core i7, 16GB RAM, and an NVMe SSD.

Not necessarily. It's entirely possible to keep a daemon running with the loaded runtime to speed up start time. I'm not arguing if and whether these languages are suitable for scripting rather startup time alone need not be a disqualifying factor. If you evaluate holistically and arrive at a language you'll always have one thing or the other that is not as what you want.

Native comp doesn't do anything for for startup implicitly, absolutely. There are no startup optimizations or anything like that. However, the speed with which elisp runs on native comp seems to be between 1.5 and 10 times faster. I run emacs on a lot of underpowered arm devices (think rpi zero) and use my full config. And the decrease in startup time on those machines was astonishing.

I don't think the breadth of the standard library necessarily affects startup time. You only pay the cost for a module when someone imports it, surely.

I don't really care about startup time personally but the linked page mentions "very low memory usage" which is quite a contrast with Clojure which seems to use insane amounts of memory for simple things.

WRT boot times, yep it can take a little bit. There are packages like revise [0] or daemon mode [1] that ameliorate this issue while developing the code- and if it is a long running script like DL training, a long startup time will not matter.

https://github.com/timholy/Revise.jl https://github.com/dmolina/DaemonMode.jl


My CLI is 180-185ms startup time, and about 10-20MB for a complex app (with a runtime dependency).

Um, not really. On BSD, you're using jails and startup is virtually instantaneous unless you want to define start orders and staggering.

One of the problems I never knew I had. Made me curious, how long does it actually take to start. Not entirely trivial to determine, but for the initialization time, Emacs has a function which reports it (of course):

  (emacs-init-time)
  "4.7 seconds"
Holy cow, that's a lot. But perhaps given that this is a first gen. Banana Pi (1GHz dual-core ARM32) not actually all that much. And given

  (emacs-uptime)
  "99 days, 3 hours, 14 minutes, 25 seconds"
not significant either.

Yeah, startup times is something that you don't really notice until you have a system that is really fast and responsive, and them you simply get annoyed by when you're using a system with slow startup times again or get accustomed again with the slowness.

Startup times didn't bother me too much, but nowadays it does, specially for things that my brain assumes that should be fast. This is why, for example, both my Neovim and Zsh configuration is tuned to start in <0.1s:

    time zsh -c exit
    zsh -c exit  0.00s user 0.00s system 84% cpu 0.007 total


    time nvim -c qall
    nvim -c qall  0.07s user 0.02s system 100% cpu 0.081 total
It does makes a massive difference, for example spawning a new shell is instantaneous and when I know that I will make some small changes I much prefer to open a file in Neovim than Emacs (my main editor/IDE nowadays).
next

Legal | privacy