10

SOLVED: see bottom of message!

I sensed pdfLaTeX was slower in TeX-Live 2020 and decided to run some benchmarking…

  • Computer: MacBook Pro (2018) with SSD
  • Document: The "novathesis" thesis template
  • LaTeX Version(s): MacTex 2019, 2020, 2021 (all versions up to date)

The chart shows the execution time (as the average of 5 consecutive runs) for pdfLaTeX, XeLaTeX and LuaLaTeX, versions 2019, 2020 and 2021.

tex-live execution times per release

My reading of the charts is:

  1. pdfLaTeX and XeLaTeX go side-by-side on execution times (XeLaTeX is becoming slightly faster);
  2. pdfLaTeX and XeLaTeX are getting slower with each release (with a huge slowdown for 2020);
  3. The slowdown in LuaLaTeX is less noticeable and in macTeX 2020 LuaLaTeX is competing with pdfLaTeX and XeLaTeX (by demerit of pdfLaTeX and XeLaTeX that became much slower).

Questions:

  1. Do you have a similar experience?
  2. What happened to pdfLaTeX and XeLaTeX to suffer such a slowdown?

UPDATE

Another benchmarking, now with (almost) no additional packages. Used the average of 5 runs, in same computer, with the code below (BTW, the resulting PDF is 545 pages):

\documentclass{article}
\usepackage{lipsum}
\begin{document}
    \newcounter{int}
    \setcounter{int}{1}
    \loop
        \lipsum[1-30]
        \addtocounter{int}{1}
        \ifnum \value{int}<100
    \repeat
\end{document}

Execution times below:

enter image description here

My reading from the numbers above is that the pdf/Xe/Lua-LaTeX engines are not getting slower. But as a user, I'm experiencing a considerable slowdown overall… Can it really be from kpsewhich? How to measure/evaluate that?

34
  • 1
    Where are the error bars? Or did you only take a single measurement? Apr 20, 2021 at 14:35
  • 1
    There are tools for benchmarking command line programs, e.g. bench and hyperfine. (Both available in homebrew: bench, hyperfine) Why not use that to benchmark kpsewhich tikz.sty or so? Output of bench for that: dpaste.com/2EN4H5LX5 (expires in 10 days) Apr 20, 2021 at 14:45
  • 1
    Version 3.14159265-2.6-1.40.20 (TeX Live 2019) • LaTeX2e <2020-02-02> patch level 5 • L3 programming layer <2020-02-25> / Version 3.14159265-2.6-1.40.21 (TeX Live 2020) • LaTeX2e <2020-10-01> patch level 4 • L3 programming layer <2021-02-18> / Version 3.141592653-2.6-1.40.22 (TeX Live 2021) • LaTeX2e <2020-10-01> patch level 4 • L3 programming layer <2021-02-18> Apr 26, 2021 at 18:55
  • 1
    @PhelypeOleinik, I deleted TL2021 and reinstalled. It is fast! Faster than TL2020. :) Then I apply the pending updates and it gets slllooowww. Not sure yet which update causes the slowdown, but we're getting there. May 1, 2021 at 21:31
  • 2
    @PhelypeOleinik, the problem was in latexmk 58886 (4.72b), which when applied made the compiling time of my document increase from 32 to 76 seconds. The current update of latexmk 59081 (4.73) solves the issue. 😃 May 5, 2021 at 8:55

1 Answer 1

3

The problem was in latexmk 58886 (4.72b), which when applied made the compiling time of my document increase from 32 to 76 seconds. The current update of latexmk 59081 (4.73) solves the issue. 😃

The reason for the slowdown (and the fix) is in the changelog entry for version 4.73:

## 30 Apr 2021 John Collins  Revert the change of 14-15 Apr, by removing the
##                           of cwd().  That gave sometimes obnoxiously slow
##                           parsing of big log files, because of the slowness
##                           of large number of calls to cwd() caused by calls
##                           to sub normalize_filename. I think I am mistaken
##                           that cwd() could possibly give a different result
##                           than getcwd(), whose cached result is used by
##                           my goodcwd(). That idea was my motivation on 14 Apr.
2
  • 3
    Oh wow, you did not mention latexmk in the original question at all. How was anyone supposed to guess that? May 5, 2021 at 13:53
  • @HenriMenke, you're right! Shame on me! May 6, 2021 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .