[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Slowdown with a Populated Folder.
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] Slowdown with a Populated Folder. |
Date: |
Tue, 31 Dec 2013 14:06:57 -0500 |
>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