[netatalk-admins] Improving papd


Subject: [netatalk-admins] Improving papd
From: Andras Kadinger (bandit@freeside.elte.hu)
Date: Fri Dec 03 1999 - 22:53:01 EST


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



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:17:31 EST