[luatex] luatex's pause

Reinhard Kotucha reinhard.kotucha at web.de
Sun Apr 5 22:56:40 CEST 2009

On 2 April 2009 Hans Hagen wrote:

 > Reinhard Kotucha wrote:
 > > I'm not sure that it's a TeX Live issue.
 > > 
 > > $ time pdflatex \\stop
 > > real    0m0.098s
 > > user    0m0.080s
 > > sys     0m0.016s
 > > 
 > > $ time pdflualatex \\stop
 > > real    0m2.329s
 > > user    0m2.192s
 > > sys     0m0.132s
 > > 
 > > I tried this repeatedly, with similar results.
 > and how about
 > luatex --ini plain \dump
 > move plain.fmt to web2c/luatex
 > luatex \end
 > runs pretty fast on my machine

Yes, the plain formats are very fast here, too.  Only pdflualatex is

 > > The pause occurs after luatex writes the banner to screen and before
 > > anything else appears on screen.  The next thing I see after the pause 
 > > is
 > > 
 > >   LaTeX2e <2005/12/01>
 > > 
 > > which implies that the problem doesn't occur after the format file is
 > > loaded.  If there is something wrong with search paths in texmf.cnf at
 > > all, then it's most likely the search path for format files.
 > maybe something in latex itself?

That would be strange.  There is only one latex.ltx which is used by
both, pdflatex and pdflualatex.
 > anyway, texmf.cnf *is* a tex live issue -)

Yes, but with -kpathsea-debug=-1 I get:

kdebug:search([pdflualatex.fmt]) => /home/reinhard/.texlive2008/texmf-var/web2c/luatex/pdflualatex.fmt
kdebug:fopen(/home/reinhard/.texlive2008/texmf-var/web2c/luatex/pdflualatex.fmt, rb) => 0x17e7e20

Then there is a pause.  This means that the pause occurs after
kpathsea determined the path to pdflualatex.fmt already and even after
the file had been opened.

The next thing I see on screen is "LaTeX2e <2005/12/01>".  However,
I suppose that this comes from the \everyjob token register and
evaluating this is one of the very first things which TeX does after
loading a format file.

I then ran it through strace.  It indeed takes much more time to load
the pdflualatex format file than the others.  There is actually no
pause.  After the format file is opened and LaTeX banner appears,
there are many "read" system calls.  

342  pdflatex
526  pdflualatex
312  pdfluatex
333  pdftex

This looks reasonable, the numbers don't differ very much.

When running pdflualatex, I see much more brk(2) system calls than
when loading the other formats.  Don't know how expensive they are and
why there are so many when pdflualatex.fmt is loaded.

50   pdflatex
470  pdflualatex
71   pdfluatex
50   pdftex

I'm still clueless.  Any idea?


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the luatex mailing list