[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multi-page hardcopying

    Date: Fri, 25 Oct 91 14:38:51 MDT
    From: jbarnett@charming.nrtc.northrop.com

    I am using GRAPH-TREE-FROM-ROOT to draw a tree (output size approx. 20 pages on
    LGP3).  It takes an hour to print.  I suspect that the generic multi-page break
    up algorithm is sending bitmaps instead of simple postscript. Is this right?  If
    so, can anything be done about it?

Not exactly.  Multi-page hardcopy works by doing the output into
PostScript code which assumes a very large page.  Then that code is sent
to the printer over and over (by buffering it as strings) for each page
with a low-level translation to align it properly on the correct page.
So, the slowness you see is (1) the same commands being sent many times
and (2) drawing a lot off the actual page.  It's all roughly o(n^2).

Once upon a time, the code defined a PostScript subroutine to do the
output, which saved on the transmission time part.  But that interacted
poorly with the memory management which it has to do, mostly for
Concordia.  [The Unix wordprocessor vendors don't even give you sympathy
when large files crash your printer.]

A much better way to do it would be to format into output records and
then partition those onto pages.  Only records which overlapped page
boundaries would ever have to be loaded more than once.  Unfortunately,
Genera does not have general purpose output records.  The whole thing
should be much more straightforward in CLIM.  [We even have a relatively
more modest internal C++ toolkit here that does it right.]

If you wanted to tackle it under the present Genera, probably the most
fruitful approach would be to have :WITH-MULTIPLE-PAGES call the
continuation multiple times and arrange for REDISPLAY-PIECE-DISPLAY-PHASE
or something around it to suppress output when the box is not within
the current page.  I wouldn't be surprised if something else broke, though.