On 12/20/2023 12:08 PM, Henrik Mannerström wrote:
According to my very limited understanding, luatex is generally slower
than pdftex because the font loading is more involved [1,2,3,4]. In
pdftex, compilation can be sped up by precompiling a preamble to a
format, which loads much faster. To my understanding precompiled formats
are not that useful in luatex due to mixing of tex- and lua-code. [5]
As I'm probably not the only one that writes many more short
math-oriented notes than complete books, the startup speed of luatex is
an issue. I resisted the switch from pdftex to luatex very long because
of this.
How hard would it be to make a luatex compatible precompiled format? One
that basically serialises the whole luatex state to a file and could
re-use it? Would it speed up the compilation of short documents? Is
there any plans or projects related to this?
you don't specify what 'slower is', depending on what you do pdftex is
some 3 times faster on simple things (only pargraphs of text) but the
difference becomes smaller on more complex documents where lua kicks in
to help with otherwise time consuming tasks
in practice one can neglect the performance drop because computers
likely have become (more than) 3 times faster since 2005, when luatex
showed up, and at that time pdftex performance was considered okay
anyway, it all depends on what macros you use, maybe try to
lean-and-mean that bit, so there is nothing that the engine can do for you
(if you run many small docs you can run them in parallel)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------