7

I found that passing -draftmode to pdflatex does not change the compile time of my document (~10 minutes) at all, while passing draft to graphicx reduces it to about 1 minute. From the documentation I thought that -draftmode should have the same effect when the long compile time is caused by a lot of figures (mine are mostly in pdf format).

Since -draftmode doesn't yield a pdf I cannot check if the graphics are included or not.

edit:

From man pdflatex:

   -draftmode
          Sets \pdfdraftmode so pdfTeX doesn't write a PDF and 
          doesn't read any included images, thus speeding up execution.

"doesn't read any included images" sounds to me quite similar to what draft does with graphicx.

edit 2: the culprit turned out not to be the figures but the version of microtype shipped with TeX Live 2012. With microtype 2.5 from ctan compilation times goes down from 10 minutes to 90 seconds.

$ pdflatex --version
pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
kpathsea version 6.1.0
Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.2.46; using libpng 1.2.46
Compiled with zlib 1.2.3.4; using zlib 1.2.3.4
Compiled with poppler version 0.18.4
  • Never seen that option before, but isn't it just compiling as it normally would, but it does not output any pdf, at least that is how I interpret pdflatex --help. I don't think -draftmode has anything to do with the draft option that some packages support. – daleif Aug 23 '13 at 11:07
  • See also tex.stackexchange.com/questions/8791/… – daleif Aug 23 '13 at 11:09
8

The description of -draftmode in the help is perhaps not entirely accurate. The idea of the option is that it doesn't write any output (DVI or PDF, depending on mode) but does create auxiliary files, etc. To get the position of material right in the 'output', it does still need to read graphics files in as far as collecting up size information. There will be some saving as the file doesn't need to be copied into the output, but not all that much if there are lots of small files (so lots of read operations to get sizes and relatively little gain from not copying them).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.