AnthonyDiGirolamo / airline-themes

vim-airline themes https://github.com/vim-airline/vim-airline-themes for emacs powerline https://github.com/milkypostman/powerline
MIT License
124 stars 20 forks source link

airline-themes causes a really slow startup on GUI emacs #6

Open Xe0n0 opened 9 years ago

Xe0n0 commented 9 years ago

My current config for theme is

(load-theme 'base16-eighties-dark t)

(require 'powerline) (powerline-default-theme) (require 'airline-themes) (load-theme 'airline-base16-gui-dark)

The emacs startup in terminal takes around 2-3 seconds, which is normal. But the GUI emacs can take up to 7 seconds to startup, only removing the airline-themes config will solve the problem.

AnthonyDiGirolamo commented 9 years ago

Hey @ZeR0-Wu, I am using terminal and GUI emacs in Mac OSX and have about a 4-5 second startup time in both. I'm not running (powerline-default-theme) as the (load-theme 'airline-base16-gui-dark) handles setting the modeline correctly. Try removing that. I'm not too familiar with the emacs package loading process and could be messing something up.

joncol commented 8 years ago

Hi, thanks for the great looking theme. I also am having problems on Mac OS X.

(require 'powerline) (require 'airline-themes) (load-theme 'airline-powerlineish)

The theme both takes long to load and while sometimes, while editing, theres a few seconds delay where the editor is completely unresponsive. It works perfectly fine both on Windows and Linux.

rymndhng commented 8 years ago

I wonder if this is caused by this missing function: curr-dir-git-branch-string

I noticed it's not present when I loaded eterm.

AnthonyDiGirolamo commented 8 years ago

Wow you're right @rymndhng I completely left that function out. I added it now and tagged the fix as version 1.3, see if that helps.

AnthonyDiGirolamo commented 8 years ago

Try running the Emacs Startup Profiler in gui emacs and see what's slowing it down: https://melpa.org/#/esup

ifonefox commented 8 years ago

I'm having the same problem. Esup says that the total startup time is only 0.4 seconds, when it is more like 5 seconds.

AnthonyDiGirolamo commented 8 years ago

I'm really not sure what's going on. I can't reproduce this with "emacs -Q" on OS X using either of the builds at http://emacsformacosx.com/ and https://github.com/railwaycat/mirror-emacs-mac

I have noticed that if emacs tries to display any emoji in files it hangs for a few seconds the first time then doesn't do it again for the remainder of the session. Not sure if that is related.

gonz commented 7 years ago

Hey @AnthonyDiGirolamo any updates on this one? This thread is pretty old but I'm also having this issue, this is what I have in my init.el:

(use-package powerline
  :ensure t)

(use-package airline-themes
  :ensure t
  :config
  (load-theme 'airline-molokai))

If I change the theme to the default powerline theme and restart emacs startup time goes back to normal (3-4s less). I'm using emacs 25.1 from http://emacsformacosx.com/ and airline-themes 20170623.958 from melpa.

ethanyu336 commented 7 years ago

try use benchmark-init to analzey startup time.. it may not be the reason of airline.

gonz commented 7 years ago

I just ran a benchmark and it doesn't show high require times for airline-themes not sure how benchmark-init works... but if I just run (powerline-default-theme) on my init.el (fast startup) and then I eval (load-theme 'airline-molokai) it takes a while: 4-5s to actually load on a pretty fast machine.

kgfly commented 5 years ago

Still repro in 2019, any update?