Subject: [netatalk-admins] Improving papd

From: Andras Kadinger <[email-masked]>
Date: Sat, 4 Dec 1999 04:53:01 +0100 (CET)

Hello everyone,

I haven!t followed the list for a while now, so I can only hope I'm not
duplicating work.

papd has been suffering from the lack of binary-transparency and also
had serious performance problems in the case of certain kinds of binary
files.

I got some inspiration yesterday, so I came up with the following patch:

http://www.lettera.hu/~bandit/netatalk/papd-binary.patch.gz

This should put an end on these problems. I changed the line-marking
function to handle all the valid PostScript line endings, and also changed
it's semantics; it no longer seeks for lines longer than 1024 bytes (an
arbitrary limi), as those lines deem not to be accepted as valid DCS lines
if we look at the 255 character limit per Adobe specs for those.  This
keeps papd from consuming enormous amounts of memory and CPU time while
spooling certain binary PostScript streams, and together with the
corresponding changes in the functions using markline also conveniently
provides for binary transparency.

There is still a lot to improve on papd performance-wise, like eliminating
unnecessary bcopying of data, and being just a bit more smart and not
trying to parse through the whole stream in the hope of finding a query
comment (but maybe I overlook something here).

I sincerely hope this finally makes papd to be at least reliably usable if
not the fastest in a heavy-duty DTP/Prepress environment. Anyone
interested please test this out; I could only briefly test it on
Linux/PPC(ANS).

My current plan is to further streamline papd for the common case, as well
as making the pipe interface a bit more flexible, making query parsing a
per-printer configurable option (allowing non-laserwriter printers to be
spooled without overhead, and other trickery, like making query parsing 
separate from the network transport, etc), also two-way and three-way
piping (not sure what this will be usable for). 

I would be glad to receive any feedback,

Regards,
Andras

---

From: Bob Krzaczek <[email-masked]>
Date: Sat, 04 Dec 1999 00:33:36 -0500

Thus spake Andras Kadinger:
;I haven't followed the list for a while now, so I can only hope I'm not
;duplicating work.

Nope; in fact, I'd say you're well ahead of me on the curve.  I've
spent my spare time lately collecting and reading about PS level 3, the
PAP protocol itself, and a bit of Appletalk (in order to understand the
intent of the networking code in papd) and was planning on getting into
papd next week.

Now, while I'm still interested in really taking a longer look at papd,
a lot of the recent patch postings certainly seem to make the bulk of
my intended changes moot.  (Which is a good thing! Why reinvent the
wheel?)

Anyway, I just wanted to say to those of you who've been sharing their
patches (Andras, Wasp, and others), thanks for sharing your work and I
look forward to giving it a spin next week!

Cheers,

// bob

-- 
// Bob Krzaczek, RIT Center for Imaging Science  <[email-masked]>