[racket] Possibility of speeding up Scribble to PDF when there's lots of images?

From: Daniel Prager (daniel.a.prager at gmail.com)
Date: Mon Jan 6 00:09:57 EST 2014

As I've added more and more images to my Scribble output I've noticed
empirically a considerable slowdown.

Currently it takes around 56 seconds to process my main file (which
includes around 36 figures); 8 seconds when I commented out all the images.

In hunting for the main bottleneck I came across this post --
http://tex.stackexchange.com/questions/39929/fast-png-embedding-using-pdflatex--
which says "PNG are recompressed during the pdfTeX run in general, but
in some cases, a direct copy is possible, which is much faster".

Conditions are given under which pngs recompression should not be induced,
but a straightforward albeit indirect alternative method is also suggested
-- use "convert" (part of ImgeMagick) to pre-process the pngs into pdfs. A
quick test of the latter with a single image gave me a speedup using
Scribble from around 3.2s with straight inclusion of a png to 2.8s
including a pre-processed pdf of the same image (pre-processing with
convert is very fast, btw), suggesting that this may well be a significant
source of slow-down.

Now, based on this I expect that I'll be able to get a reasonable speed-up
by saving out pngs, convert-ing them, and @image{}-ing the files back into
my Scribble, but I was wondering whether someone might have other tips
and/or whether there's any prospect of snappier image inclusion in the
standard pipeline: e.g. by ensuring that pngs are output in a format that
isn't recompressed or incorporating the convert trick into the conventional
Scribble to pdf pipeline.


Thanks

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140106/1cea2995/attachment.html>

Posted on the users mailing list.