# Performance of LaTeX and other TeX derivatives

I need to generate thousands of pdf reports, based on some data. Right now I am using pdflatex for this. Are there differences in performance between pdflatex and other TeX derivatives? My content is mainly tables, figures (TeX based code) and some text. No references, no BibTeX. Right now I need two LaTeX runs for a correct rendering. Maybe I can get down to one, if I can get rid of longtables.

-
You can probably get `longtable` to only require one run if you tweak it a bit. If you don't use a repeating table head then it is enough to increase `\LTchunksize` to be bigger than the number of rows of the table. If you do have a table head it needs to be as wide as the widest row, but if you know that you can put it first with a `\kill` line. – David Carlisle Jun 21 '12 at 14:24
One way to much faster compilations is to code in plain TeX, instead of LaTex and to create your own format with only the commands you need. Another way is to change from TikZ/Pgf to MetaPost and use LuaTex (since MetaPost is built-in). LuaTeX is slower than pdfTeX for mainly text based documents but magnitudes faster when it comes to generating documents with lots of graphics. If that's a feasible way, depends entirely on your type of documents and complexity of graphics. – Marco Jun 21 '12 at 14:33
Do you know that it is an issue? These days, TeX is fast on any reasonable hardware at all. Have you tried it and it takes 25 hours for a daily job, or are you worried that it might? – Jim Hefferon Jun 21 '12 at 22:00
Considered a ramdisk? If your runs are I/O-bound instead of CPU-bound, it could help. – Mike Renfro Jun 22 '12 at 1:54
@JimHefferon: I have a limited amount of time for this mass report job. Only a couple of seconds per job, hence performance of LaTeX is of great interest. – Arne Jun 22 '12 at 6:07

Use plain TeX

One way to much faster compilations is to code in plain TeX, instead of LaTeX.