manateelazycat / awesome-tab

Emacs package to provide out-of-the-box configuration to use tabs.
384 stars 38 forks source link

Extremely slow Emacs startup due to AwesomeTab #106

Closed liar666 closed 3 years ago

liar666 commented 3 years ago

Hi,

I recently had a total loss of data on my HD. I recovered my .emacs and .emacs.d files from a backup and ran an update of all the installed packages (mainly: jdee, ess, auxtex, lsp-mode, lsp-java, lsp-latex).

Then I noticed Emacs was veeeeeery slow to startup (~10sec), even to open a single text file.

So I followed many tutorials to debug/speedup Emacs startup, like using ESUP and profile-dotemacs.el.

Unfortunately, both reported quite reasonable startup times, which is absolutely NOT what I was experiencing.

emacs -Q still opened in a breeze.

So I started un/commenting lines in my .emacs.d/config.org, and finally discovered that removing the following lines solved the problem:

(add-to-list 'load-path (expand-file-name "~/.emacs.d/awesome-tab/")) ; <- path where I git cloned your repo
(require 'awesome-tab)
(setq awesome-tab-dark-unselected-background-color "black")
(setq awesome-tab-dark-unselected-foreground-color "dark gray")
(setq awesome-tab-dark-selected-background-color "black")
(setq awesome-tab-dark-selected-foreground-color "light gray")
(setq awesome-tab-show-tab-index t)
(awesome-tab-mode t)

Making the startup procedure from <1sec (without awesometab) to >5sec (with awesometab).

I've also noticed that the problem when awesometab is activated seems to be a graphical/rendering one (which would explain why ESP/profile-dotemacs did not find it): When starting Emacs, I can see, in the modeline, that the loading of each package seems to go fine, until I see the "Extension ignored" message (See **message** buffer below), which seems to indicate everything went fine. However, the GUI is then freezed during ~4 sec before the menu line + the content of the buffer appear.

Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done
Loading /etc/emacs/site-start.d/50latexmk.el (source)...done
Loading /etc/emacs/site-start.d/50pylint.el (source)...done
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...done
Wrote /home/gmuller/.emacs.d/config.el [34 times]
Tangled 34 code blocks from config.org
Loading /home/gmuller/.emacs.d/config.el (source)...
Local Ispell dictionary set to british
Loading /home/gmuller/.emacs.d/config.el (source)...done
Loaded /home/gmuller/.emacs.d/config.el
For information about GNU Emacs and the GNU system, type C-h C-a.
Extension ignored
Mark set

I also git pulled the lastest version of your repository, in case the problem was known & solved. But problem is still there.

What is really strange is that I don't remember having this kind of problem before loosing/recovering my data, so it might come from an incompatibility of awesometab with a recent update of one of my other packages.

For the moment I've disabled awesometab so that I can work, but I love the extension, so I would like to help finding how to solve the problem so that I can reactivate it.

As I'm a newbie in LISP (and a very moderate Emacs user), I don't know what to do to debug such a strange rendering problem, that neither --debug-int, nor ESUP nor profile-dotemacs.el can detect.

Thanks for your help

Nexion commented 3 years ago

I'm using Emacs 27.1 and can confirm that emacs startup time is noticeably slower with awesome-tab. I found this package just yesterday and installed it together with all-the-icons.el. Commenting out the latter didn't show any improvement, but when I commented out only awesome-tab related lines in .emacs config, the latency disappeared. Tabs look really nice though, I hope this issue can be solved.

Nexion commented 3 years ago

Okay I found what happened in my case and reproduced it once again to be sure. While I had both packages installed, I skipped running M-x all-the-icons-install-fonts. With those fonts properly installed the startup time got back to normal.

manateelazycat commented 3 years ago

Please check load-path, if it's too big, will slow down Emacs start and open file. I use awesome-tab everyday and use 300+ plugins, I only need 0.9s to start Emacs.