[net.news] inews efficiency

rees@apollo.uucp (Jim Rees) (03/14/86)

I have nightmares about exactly what happened to Brian Reid.  In my
nightmare, I am a spool directory, and queues full of net.lightbulbjokes
are attacking me.  I can't understand what they are saying because it's
all in rot13, which I studied in school but flunked because my teacher,
Paddy O'Furniture, didn't like my net.politics.

At one time I went on an optimization binge in the inews code.  I put in
some measurements and found that we were processing about 40 articles per
hour.  After making some simple fixes, I upped that to over 300 per hour.
This is on an Apollo dn460, which I think translates to something like
a Vax 780 in performance.

I don't remember what all the speedups were, but some things were:

Take out the checks to make sure the spool and lib directories are there.
If they aren't, inews will find out soon enough.

Don't read the password file when running as inews (as opposed to rnews).
Who cares who the real user id is?

Generate a unique ID for sequence numbers, instead of reading and re-writing
/news/lib/whatever (applies only to rnews).

More efficient use of temp files.

More efficient use of history and logging files.

Better method of locking, both of inews invocations and of articles.

Take out the /bin/sh step in unbatching, if your scheme uses one.  Write
a special purpose unbatcher that runs inews directly.