[OS X TeX] Mulicores?

Jonathan Fine jfine2358 at gmail.com
Wed Jul 6 12:00:29 CEST 2022


Luís Sequeira wrote:

> pdflatex is a single threaded program and I believe that other tex
> engines, xelatex and lualatex, are too.

> The processing of a latex file is pretty much sequential anyway, so it is
> hard to see how multithreading might help in this case. If someone has a
> different understanding of this, I would like to learn about it.

I'll look at the question both narrowly, as clearly stated by Luís, and
broadly in terms of LaTeX responding more quickly to typesetting requests.

Don Knuth's TeX introduced dvi (DeVice Independent) files as an
intermediate between typesetting and rendering. (Take this as a definition
of typesetting and rendering.)  I've read that XeTeX retains this
distinction. This division between the two allows the typesetting to be
piped to the rendering, which allows two cores to be used.

LaTeX requires multiple runs to resolve generated text such as equation and
page numbers, and also the index. These intermediate runs are usually
performed by a script, and no human being looks at the intermediate PDF
files generated by pdflatex.

If rendering is separate from typesetting then it can be omitted from the
intermediate runs. This will speed matters up, particularly if the document
being typeset has much graphics. Even without separation a speedup is
achieved if graphics are rendered as grey boxes on all but the script's
final run of pdflatex.

If typesetting can be done chapter by chapter, a separate core can be used
to process each chapter. This is fairly straightforward for the
typesetting. For rendering to PDF multiple cores can still be used,
followed by a tool that will concatenate the resulting PDF files.

Most of the above is I believe possible with pdflatex as it is, or with
only minor changes. More extensive changes will allow authors to be
provided with an even more rapid edit-typeset-preview loop.

Worth looking at here is David Platt's statement: You [developers] think
your users want to use your software. They do not want to use your
software.  They want to have used your software.


wishing you rapid texing

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/macostex-archives/attachments/20220706/04da1518/attachment.html>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the macostex-archives mailing list.