12

I am wondering about what the bottleneck of the compilation speed of LaTeX is (e.g. MiKTeX/MacTeX/etc). By looking at information on CPU usage, it appears that the compiler uses only a small fraction of the capability of the processor. For a short document (below 100 pages), there is certainly no heavy memory use as well.

So, what is really the bottleneck? Why do we experience a significant compilation time in seconds (compare to other things we experience daily, such as rendering html?), even though making a pdf document does not look like a complicated task? And is there a better optimised compiler to make this process faster?

7
  • 2
    Have a look at I/O costs. LaTeX accesses many very small files. That's often costly. Commented Jun 15, 2022 at 7:40
  • 1
    take a small document and add \tracingall at the top then look in the log to see what latex is doing Commented Jun 15, 2022 at 9:59
  • 6
    One funny experiment any TeX user should try at least once in their life (even if it isn’t completely allowed, but we won’t tell anyone) is to try to compile the TeXbook. Last time I did it on my work laptop from 2016, it took less than a second, even if it’s almost 500 pages. This shows how much time LaTeX has to waste digging around in its bloated arsenal of packages and complicated macros. Commented Jun 15, 2022 at 11:11
  • @Gaussler Yes, the overhead of »complicated macros« is the price for usability. By the way, how did you solve the issue getting a PDF/A-1b with plain TeX? Commented Jun 15, 2022 at 14:25
  • 1
    Dupe compiling - Is there any way to get real-time compilation for LaTeX? - TeX - LaTeX Stack Exchange // compiling - Speeding up LaTeX compilation - TeX - LaTeX Stack Exchange. (seriously I hope there's one too, but if someone made one it must have gotten very popular and get posted there already. Unfortunately there isn't one yet) Commented Jun 15, 2022 at 14:57

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.