[texhax] Throughput

Peter Davis pfd at pfdstudio.com
Fri Mar 4 18:37:54 CET 2011

On Fri, Mar 4, 2011 at 12:28 PM, Heiko Oberdiek <
heiko.oberdiek at googlemail.com> wrote:

> On Fri, Mar 04, 2011 at 11:46:31AM -0500, William Adams wrote:
> > Will things be better in LuaTeX? Really, all one would need would be a
> > list structure which one could check before loading a graphic to see if
> it
> > had already been loaded --- add it to the list if not and it ``just
> > works''.
> Some things can be done better with and without LuaTeX,
> some things can never be done better with or without LuaTeX,
> and some things can be done better with LuaTeX.
> Those "things" depend on the macro interface, the macro driver interface,
> the output driver, the TeX compiler and the output format.
> If the same image is used twice you have also take into account,
> how it is used. There are many parameters that influence the
> image loading (width, height, scaling, rotating, clipping, viewport,
> image manipulation options, ...). Some of the parameters can also
> be applied on the black box where the image is previously saved.
> Others require the reloading of the image. Of course, the set
> of parameters might differ for different drivers and image types.
There are two separate problems:

1) I want the image to be defined in an image XForm in the resulting PDF,
and simply referenced each time it occurs.

2) I'd like the actual image file to be accessed as little as possible
during the run of XeLaTeX, for performance reasons.

In a run of 35,000 pages, such as my current test, it's likely I'll
encounter more than 256 unique images, so using box registers will not help
in general.  If I could identify the most frequently occurring images, I
could use box registers for those but, alas, I have no way to do that
without pre-processing the entire XML, and that's not an option.  I could
simply use box registers for the first 256 images encountered in a run, and
that may actually help in most cases.

Also, as you point out, some of the images may be used multiple times, at
different scales and or rotations.  This is pretty common with logos, for


The Tech Curmudgeon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110304/d36d78b2/attachment.html>

More information about the texhax mailing list