(tool-bar-mode 0) takes up 11% of my initialization time (about a third of a second). It's not that big of a deal; it's just strange. I've tried it on multiple computers. I've also tried disabling everything but that line in my .emacs. It always takes a while.

Is this normal? Is there a better way to do it?

  • How do you know it's this line? What version of Emacs is this? I'd like to see if I can reproduce this. – rekado Feb 25 '15 at 21:01
  • 1
    I first noticed it when I was profiling my .emacs. I ran that line by itself by commenting everything out, with the same result. I have tried 24.4 stable and 25.0 snapshot, on Windows and Ubuntu respectively. – Matthew Piziak Feb 25 '15 at 21:05
  • After adding the line to my init.el, the initialization time still comes out to be the same. Are you checking the time with M-x emacs-init-time? – gkumar7 Feb 25 '15 at 23:21
  • 1
    Yep. With an empty init file, emacs-init-time takes 0.5 seconds. With (tool-bar-mode 0), it takes 0.8 seconds. – Matthew Piziak Feb 25 '15 at 23:25
  • 3
    Set Emacs.toolBar: 0 in ~/.Xresources file. Any modification related to X window will be faster that way, because it will be applied before window is created|mapped. – kmicu Feb 26 '15 at 22:17

A slightly less general but simpler version of what tool-bar-mode does:

(push '(tool-bar-lines . 0) default-frame-alist)

The same can be done with menu-bar-mode and the menu-bar-lines frame parameter, if you are interested.

Note that this will likely only shave a few cycles, if any. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.