[XeTeX] [texhax] Throughput

John Was john.was at ntlworld.com
Sat Mar 5 17:08:11 CET 2011


I haven't followed this closely, but it might be worth having a look at how you position text randomly on the page (unless you have already, in which case apologies).  In pre-XeTeX days I used PSTricks to produce the cropmarks and date/time stamp on each page (essentially using \rput to put the rules and text at different positions), and old plain TeX processed quite large books in just a few seconds.  When I moved over to XeTeX (I still use plain) I soon identified PSTricks as the culprit when books began to crawl along page by page - so I now typically use Edmac's \cropmarks for the cropmarks and the a combination of plain TeX's \smash \raise, and sometimes \llap or \rlap for the date/time stamp line, and everything works as expected (with a very noticeable slowing down on particular pages if I have a few lines of PSTricks code somewhere).

I recall you said at the start that you were using some package to position text randomly, and wonder if that is contributing to the processing time.



  ----- Original Message ----- 
  From: Peter Davis 
  To: TeXhax ; xetex at tug.org 
  Sent: 05 March 2011 13:33
  Subject: Re: [XeTeX] [texhax] Throughput

  On Fri, Mar 4, 2011 at 5:58 PM, Peter Davis <pfd at pfdstudio.com> wrote:

    On Fri, Mar 4, 2011 at 2:38 PM, Peter Davis <pfd at pfdstudio.com> wrote:

      On Thu, Mar 3, 2011 at 4:07 PM, Peter Davis <pfd at pfdstudio.com> wrote:

        On Thu, Mar 3, 2011 at 10:53 AM, Martin Schröder <martin at oneiros.de> wrote:

          2011/3/3 William Adams <will.adams at frycomm.com>:

          > Have you tried processing it w/o including the graphics?

          That would be my first guest. Try with the draft option...

        (NB: Just replying to texhax, to avoid cross-posting issues I seem to have triggered.)

        I tried running 200 pages, with and without draft mode.  Specifically, I put draft mode on the graphicx package:


        I used the --time-statistics option on the xelatex command to get timings.  The results are:

        gross: 111634 ms, user mode: 17050 ms, kernel mode: 50778 ms, total: 67828
        gross: 77941 ms, user mode: 12589 ms, kernel mode: 27300 ms, total: 39889

      Now using \newfontfamily *and* [draft]{graphicx} ...

      gross execution time: 45458 ms
      user mode: 8658 ms, kernel mode: 25006 ms, total: 33664

      A definite improvement.  Now to try etex and box registers for the external graphics.

    Ok, I tried using \savebox, and got this:

    gross execution time: 3996 ms
    user mode: 1123 ms, kernel mode: 436 ms, total: 1559

  I fixed the random name generator (which generates unique names for the saveboxes), and now the entire 35,000 page job runs in 8 minutes.  Quite a difference from over 10 hours!  This was just from two optimizations: using \newfontfamily and using \newsavebox for all the graphics.

  I'd still like to get it down to 2 or 3 minutes, but I'm in range now.

  Thank you *VERY* much for all the help suggestions and information here.  (Sorry for cross-posting again, but I wanted to reach everyone who commented.  Please don't reply to both lists.)


  The Tech Curmudgeon


  Subscriptions, Archive, and List information, etc.:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110305/6ae0187c/attachment.html>

More information about the XeTeX mailing list