Here's my MWE (it's really M, as the content isn't too relevant):
% !TEX TS-program = xelatex
\documentclass{article}
\usepackage{fontspec}
\begin{document}
\end{document}
Since I migrated to TeX Live 2016 (I'm fairly certain that's when this behaviour started), this document takes some ten minutes to process.
I believe it's because XeLaTeX is rebuilding the font cache every time it runs.
Before this started, an occasional ....TeX run would pause for the cache rebuild, but after that, further runs of any document would go quickly.
I am not seeing this behaviour with LuaLaTeX.
Here is a piece of the TeX log file. I have inserted three exclamation points (!!!) at the exact point (as far as I can determine) at which the pause occurs:
Package: fontspec 2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX
(d:/Programs/TeX.Live/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
Package: fontspec-xetex 2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTe
X
... (fontspec macro dump)
(d:/Programs/TeX.Live/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2016/06/19 v1.99m Standard LaTeX package
(d:/Programs/TeX.Live/texmf-dist/tex/latex/euenc/eu1enc.def
File: eu1enc.def 2010/05/27 v0.1h Experimental Unicode font encodings
)
LaTeX Font Info: Try loading font information for EU1+lmr on input line 105.
(d:/Programs/TeX.Live/texmf-dist/tex/latex/euenc/eu1lmr.fd
File: eu1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)!!!) <=== Here, at some point in fontenc.sty
(d:/Programs/TeX.Live/texmf-dist/tex/xelatex/xunicode/xunicode.sty
File: xunicode.sty 2011/09/09 v0.981 provides access to latin accents and many
Any ideas, please?
fc-cache
is run, XeTeX will rebuild on every compilation? But why wouldfc-cache
not have been run system-wide if something new was added? I realise that stuff happens and things go wrong, but it seems weird for that many people to get bitten by something which depends on a step required for proper system configuration to be skipped.fc-cache
being run. (Probably the exception is if a TeX Live update installed new TTF/OTF, but that's much less common and would be cancelled out next time any other fonts were installed or updated or whatever. And that's only an issue because I use upstream but added system integration on top. I.e. it wouldn't happen by default.) But if it is Windows, I have no idea about anything and wouldn't have commented ;).