rolandwalker / unicode-fonts

Configure Unicode fonts for Emacs
227 stars 28 forks source link

Startup cost with cache is not "negligible" #20

Closed rpglover64 closed 8 years ago

rpglover64 commented 8 years ago

In the documentation:

[...] when you start Emacs the second time, the startup cost should be negligible.

For me, at least, it is not. Without the cache, running unicode-fonts-setup takes 68 seconds; with the cache it takes 24 seconds. This is a huge improvement, but it's still not something I can put into my init.el without thinking twice.

Issue #7 is probably related.

rolandwalker commented 8 years ago

Hi!

Actually #7 was done a long time ago. When you look into ~/.emacs.d/var/pcache/unicode-fonts you should see pre-generated Lisp under a key prefixed with instructions-.

The generation of that code is expensive and involves checking for which fonts are available. Simply running that generated code is quick. Of course it is difficult figuring out all the platform-specific variations. Since things are running slow for you I assume that the generated code is not present or is not being executed on your system.

You might try:

rpglover64 commented 8 years ago

I just tried on a fresh home directory, and I had no issue; after caching, it was instantaneous. It seems the problem is in my configuration.

It seems that the problem is solved by ensuring that the spacemacs-cache-directory variable ends in a "/".