[NTG-context] distributed / parallel TeX?

Lars Huttar lars_huttar at sil.org
Tue Dec 16 18:25:59 CET 2008


On 12/16/2008 9:53 AM, Hans Hagen wrote:
> Aditya Mahajan wrote:
>> On Tue, 16 Dec 2008, Hans Hagen wrote:
>>
>>> Lars Huttar wrote:
>>>> Hello,
>>>>
>>>> We've been using TeX to typeset a 1200-page book, and at that size, the
>>>> time it takes to run becomes a big issue (especially with multiple
>>>> passes... about 8 on average). It takes us anywhere from 80 minutes on
>>>> our fastest machine, to 9 hours on our slowest laptop.
>>>
> 
> in jelle's doc it's the many many many local font definitions and the
> some 800 metapost graphics that are the culprit

We have close to 7000 mpgraphics, and they add about 15 minutes to the
run time.
But the run time was already quite long before we started using those.

> 
> - define fonts beforehand

OK, we will look into this. I'm sure Jelle knows about this but I'm a
noob. I'm pretty sure we are not *loading* fonts every time, but maybe
we're scaling fonts an unnecessary number of times.
For example, we have the following macro, which we use thousands of times:
	\def\LN#1{{\switchtobodyfont[SansB,\LNfontsize]{#1}}}
Would it help much to instead use
	\definefont[SansBLN][... at \LNfontsize]
and then
	\def\LN#1{{\SansBLN{#1}}}
?

> - use unique mpgraphic when possible

I would be interested to know if this is possible in our situation. Most
of our mpgraphics are due to wanting thick-and-thin or single-and-double
borders on tables, which are not natively supported by the ConTeXt table
model.
The advice I received said to define each mpgraphic using
\startuseMPgraphic (we have about 18 of these), associate them with
overlays using \defineoverlay (again, we have 18), and then use them in
table cells using statements like
	\setupTABLE[c][first][background={LRtb}]
Empirically, this seems to end up using one mpgraphic per table cell,
hence our thousands of mpgraphics. I don't know why a new mpgraphic
would be created for each cell. Can someone suggest a way to avoid this?

> i changes the definitions a bit and now get 5 pages per second on my
> laptop in luatex; xetex processes the pages a bit faster but spends way
> more time on the mp part

My last run gave about 0.25 pages per second on our fastest server, when
taking into account multiple passes; that comes out to about 2 pps for
--once.

> (of course 1450 pages of columnsets and multipage bTABLE's also cost a
> bit of time)




More information about the ntg-context mailing list