3

I just installed MacTeX 2015 on OS X 10.6.8, and it is typesetting significantly slower than the 2014 distribution; for one particular file, 2014 will typeset it in 11 seconds, but 2015 takes 77 seconds (!). Has anyone else had this problem? If not, any ideas on what might cause this? Thankfully, MacTeX added a Preferences pane that makes it easy to switch back to old versions.

/Library/TeX/texbin is still in my path, the TeX file in /etc/paths.d points to the same thing, and the texbin in /usr is also from the 2015 install. I'm not sure what would need to be changed if the path is the problem.

The slowdown occurs with all the files I've tried, but here's a relatively short one that shows quite a difference: http://freitag.creighton.edu/Example.tex

This runs in about 4 sec. using 2014, but 35 sec. using 2015. Using 2015, it hangs between the lines

(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))

and

[1{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]

in the console, although that's not the case for all the files I've tried.

  • 4
    most likely your paths are not set up correctly in the 2015 install so it is having to search the filesystem for files rather than use the pre-cached kpse ls-R files. – David Carlisle Jul 11 '15 at 17:31
  • @DavidCarlisle Would the correct way to rectify that be sudo texhash? – Sean Allred Jul 11 '15 at 21:19
  • @DavidCarlisle Doesn't it usually just say it can't find things in that case? – cfr Jul 11 '15 at 21:52
  • 1
    Does this happen every time or only the first time? Or only the first time after reenabling 2015? Because some things have to be redone e.g. caches created for a new installation. Especially if you are using XeTeX or LuaTeX or if you are using metafont fonts. Also Biber and probably some other things. – cfr Jul 11 '15 at 21:53
  • @SeanAllred possibly except install should have done that so it could be the environment variables are missing the ! so ls-r isn't consulted and it always searches the filesystem, in which case re-running texhash won't help/ – David Carlisle Jul 11 '15 at 22:00
  • @cfr It does happen every time, and the main slowdown is well into the .tex file, at least according to the console output. I've only been using LaTeX for a few months, so my files are fairly simple; no special fonts or exotic packages... just lots of equations. I tried sudo texhash, but it had no affect. I can't imagine it would help, but I'm going to try reinstalling the 2015 version. – Mark Freitag Jul 12 '15 at 00:42
  • 3
    What is the console output just before and just after the slow down? What is the smallest document you can reproduce the slowdown with? Could you post it here so we can try reproducing it? – cfr Jul 12 '15 at 01:17
  • The mhchem package is very slow... – Paul Gaborit Jul 12 '15 at 06:01
  • @MarkFreitag Your example is no longer downloadable... – Paul Gaborit Jul 14 '15 at 08:25
  • What was in the example? version=4 and a simple \ce{H2O} does not seem slow on my TL15 (linux) – daleif Jul 14 '15 at 08:26
  • @daleif: Imho the problem is inside math. – Ulrike Fischer Jul 15 '15 at 18:45
  • Ok, I'll test that when I'm at a pc – daleif Jul 15 '15 at 19:03
  • Hmm, I can get it to slow down even on version=3 by typing the same \ce{H2O + CO2 ->[][b] X} ten times. Then there is a noticable halt just before the .aux file is loaded. The halt seems the same on version 3 vs 4. – daleif Jul 16 '15 at 11:29

1 Answers1

1

The mhchem package v4.x is very very slow! In your file (Example.tex), you may try to replace:

\usepackage[version=3]{mhchem}

by the following lines (and use a faked \ce macro):

\usepackage{amsmath}
%\usepackage[version=3]{mhchem}
\newcommand\ce[1]{\ensuremath{#1}}

As you use mhchem v3 features, you may download and use an old version of mhchem (v3.21):

https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/mhchem/mhchem.sty?revision=36504&view=co

Here, you can compare durations of compilation:

mhchem v4.01    => 13.0s
mhchem v3.21    =>  1.7s
faked \ce macro =>  0.2s
Paul Gaborit
  • 70,770
  • 10
  • 176
  • 283
  • Wow. What is going on in the package? \tracingmacros of a subset of the example gave me a log file with millions of lines ... – Ulrike Fischer Jul 12 '15 at 10:54