0

When using dvipdfmx for PDF generation from DVI, one has the -I option, which caches images for a specified number of hours between runs. This is very useful to speed PDF generation when including large image files. As far as I can tell, there is no such option for pdftex/pdflatex when generating PDF. Such a question was asked before (Caching includegraphics{} image files for speed), but was not answered definitively either way and may have been interpreted for PNG files only. Is it possible, at least for inclusion of PDF files? I know about draft mode; that does not answer my question because it does not include the images.

  • 1
    The -I option in dvipdfmx is for eps files. eps files are changed into pdf files before inclusion. The -I option caches transformed pdf files in order to skip the changing process which is time-consuming. For other format of images like pdf, png, ..., -I option does nothing. – Akira Kakuto Nov 21 '20 at 22:07
  • If you are on Linux, you could copy all the images to the RAM file system (tmpfs) which is usually mounted on /dev/shm and add this directory to the search path with \graphicspath{{/dev/shm/}}. Not sure whether it makes a difference, though. – AlexG Nov 21 '20 at 22:57
  • @AlexG I am on Linux, and I tried using /dev/shm, but it made no difference. Thanks for the suggestion, anyway. – Russ Lyons Nov 22 '20 at 19:03
  • Did you look into the log file and verify the location from which the images were loaded? (Just an idea.) – AlexG Nov 22 '20 at 20:17
  • Maybe the difference is negligible nowadays, as SSD discs are mostly in use. Did you experience a noticeable speed-up with dvipdfmx -I? – AlexG Nov 22 '20 at 20:33
  • @AlexG I had to change the actual include line to give the path, and I did check the log file. I do use SSD. When I use dvipdfmx -I on a different file that uses a very large number of EPS figures, the difference is clear. I did not test changing this PDF figure to EPS. – Russ Lyons Nov 23 '20 at 00:17

0 Answers0