Natterings about history files

Russ Allbery rra at
Sat Mar 3 11:46:33 UTC 2001

Alex Kiernan <alexk at> writes:

> One option might be to shortcut the start of the expire, since the
> history will normally be sorted by arrival time. When running the
> expire, note down where tomorrows expire will start checking entries
> (i.e. skip over the ones we'll just delete), then tomorrow, start from
> that point in the history file, rather than at the beginning.

> It loses some robustness though & I'm not convinced the overhead in
> reading through those lines is so large as to make it a worthwhile
> optimisation.

Well, it's more than just reading lines; currently, expire stats every
article on disk to make sure it still exists (essentially).  Worse yet, I
think that it's currently doing it twice, once in expireover and once in
expire, except for those methods that have EXPENSIVESTAT set.

With HISreplace, we can obviously get that down to just one stat.  That
one sweep through all of the spool is necessary for CNFS (but should be
fairly fast -- I have this sneaking suspicion that RETR_STAT could be made
a lot faster for CNFS, but I've not looked at the code long enough to be
sure) and is necessary if you're deleting articles out of the spool via
mechanisms that INN doesn't know about.  But we should probably have a
mechanism whereby we can turn it off for people who don't want it.

Russ Allbery (rra at             <>

More information about the inn-workers mailing list