[OS X TeX] Loading keyval is slow

Jonathan Kew jonathan_kew at sil.org
Mon Jan 16 05:28:02 EST 2006

On 16 Jan 2006, at 9:41 am, James Crippen wrote:

> I'm using the i-Installer TeX install with XeTeX and the fontspec
> package. I'm kind of annoyed at how slow it takes to load keyval.sty.

I doubt that it's really keyval.sty that's slow to load.... the main  
thing that takes time is probably XeTeX scanning your installed  
fonts, which happens the first time you use fontspec (or the  
primitive \font command) to load an OS X font.

If your preamble includes \usepackage{fontspec} and then does  
\setromanfont{...}, for example, you'll see in the console that  
fontspec is loaded, then keyval (which fontspec uses); then *after*  
keyval has been read, your \setromanfont is executed, causing a font  
scan. That's where the delay happens.

Can you do anything about it? Well, if you have lots of fonts  
installed that you never actually use, you could consider removing  
the excess clutter; that'll help. But if you have lots of fonts  
installed because you *do* want to use them, then that's no solution!

If you have Norton Anti-Virus installed, that has been reported as  
causing serious slow-downs, so you could consider alternatives -- or  
at least try turning it off temporarily, and see whether it's having  
an impact for you.

One thing you *can't* do (in case anyone suggests it) is create a  
new .fmt file that has the fonts you're using preloaded. XeTeX won't  
allow you to \dump a format if there are "native" OS X fonts defined.  
This is because the font information is highly volatile; any change  
in the system's font configuration, or even just a restart, leading  
to ATS assigning fresh font references, could invalidate the format  

(You could make a custom LaTeX format with the macro packages you use  
preloaded -- not the actual OS X font definitions -- but in practice  
I don't think that's going to make much difference.)

So in summary, unless you have a case of the Norton slow-down, or an  
excessive number of fonts installed that you really don't need,  
there's not much you can do about this for now; sorry. I know it's an  
issue, and hope to improve the situation in future releases.


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list