I like a clean interface. One without the clutter of scroll bars, or menu bars. So, to remove them, I have the following in my init.el
(progn (menu-bar-mode -1) (scroll-bar-mode -1) (tooltip-mode -1) (tool-bar-mode -1) (set-face-attribute 'default nil :height 150))
However, these 5 lines are slow. I profiled my startup using esup. And this is what I found
Total User Startup Time: 0.498sec Total Number of GC Pauses: 0 Total GC Time: 0.000sec init.el:10 0.231sec 46% (progn (menu-bar-mode -1) (scroll-bar-mode -1) (tooltip-mode -1) (tool-bar-mode -1) (set-face-attribute 'default nil :height 150))
Half of my startup time comes from these 5 lines. Is there any way I can accomplish these same tasks faster? Specifically the menu, scroll, tooltip, and toolbar. Those seem like they should be very quick operations.
Ps. Yes, I know if you use emacsclient, the startup time doesn't matter. But, that's not what this question is about.
Edit: I checked the time for each line individually. Here are the results:
(menu-bar-mode -1) ;; 0.032sec (scroll-bar-mode -1) ;; 0.105sec (tooltip-mode -1) ;; 0.000sec (tool-bar-mode -1) ;; 0.000sec (set-face-attribute 'default nil :height 150) ;; 0.120sec
So, I guess I need to rephrase my question. How can I disable the scroll-bar faster?