nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Slowdown with a Populated Folder.

2013-12-31 13:07:07
A couple of points come from it...  Why does mark(1) above have to read
the folder when it's just doing a list of the .mh_sequences?  Is it
verifying the sequence's content against what still sits in the folder?

Short answer: yes.  It calls folder_read(), which is calling readdir()
(but not stat()) to get every filename.  That's how invalid sequence
information gets cleaned up silently.  Most nmh programs call
folder_read() at some point.

`mark -s foo -d all' gives an error if sequence foo doesn't exist, at
least with this old version.  Consequently, another mark is needed
first, the one above, to detect if the sequence exists.  A more useful
interface would cut the number of userspace commands that need to run,
and thus the number of getdents.

It looks like "mark -s foo -zero -d all" does what you want?  Which is
a bit inelegant, okay ... but if it makes you feel any better, the
sequence isn't actually created on-disk in that case if it doesn't
exist; the creation/deletion step is all internal.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>