[pdftex] Re: Speeding up PDFLaTeX by skipping file inclusion

Reinhard Kotucha reinhard.kotucha at web.de
Sat May 17 03:12:07 CEST 2003


>>>>> "Alan" == Alan Shutko <ats at acm.org> writes:

    >> You could also consider
    >>
    >>     latex -> bibtex -> latex -> pdflatex

    > I find that makes hyperref slightly unhappy with the aux file, so I
    > have to run pdflatex again.

Now, as you say this, I remember that I had this problem in the past,
too.  But the document I'm working on at the moment (abt. 190 pages)
runs without trouble.

I must admit that latex is pdflatex with \pdfoutput=0 here because I
make use of character protrusion and I'm not sure whether I get
different line/page breaks when I run the file through Knuth's tex
with character protrusion disabled.

This is an excerpt from the Makefile:

PDFLATEX=pdflatex --shell-escape
LATEX=pdflatex --shell-escape '\pdfoutput=0 \input '

$(MAIN).pdf : $(MAIN).tex $(INCLUDES) $(GRAPHICS)
	$(LATEX) $<
	$(LATEX) $<
	$(PDFLATEX) $<

But I think that it shouldn't make any difference, dvips.def is used
if \pdfoutput=0.

Maybe Heiko can tell us where we have to expect trouble.

    >> And you could convert all your jpg files to pdf because this
    >> speeds up the pdflatex run significantly.  Otherwise pdftex has
    >> to do the jpg -> pdf conversion.

    > Does this really speed it up much?  Doesn't PDF support jpeg
    > compression, so all it would really have to do is put in a
    > wrapper?  I haven't timed it, though.

I converted 20 jpegs coming from digital cameras to pdf using
ImageMagick.  The pdf files are much smaller, BTW.

$ du -s *.jpg|grep total
5732    total
$ du -s *.pdf|grep total
1752    total

Then I prepared two tex files which includes all the graphics

$ time pdflatex alljpg.tex >/dev/null 

real    0m1.835s
user    0m1.650s
sys     0m0.180s

$ time pdflatex allpdf.tex >/dev/null 

real    0m0.841s
user    0m0.720s
sys     0m0.120s

The time to read the files is negligible

$ time cat *.jpg>/dev/null 

real    0m0.033s
user    0m0.010s
sys     0m0.020s

All files have been read from the cache rather than from the disk
(I ran "cat *>/dev/null" first).

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			             Phone: +49-511-27060390
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 pdftex mailing list