nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] new command lacks lock

2013-10-14 14:52:36
Hi, I wrote these commands, based on lukem(_at_)netbsd(_dot_)org's original new
Perl script, which I'd used for years before offering up this "core"
version.

On Sat, Oct 12, 2013 at 10:07 PM, Ken Hornstein <kenh(_at_)pobox(_dot_)com> 
wrote:

The big difference here is that folder_read() does a complete readdir()
on the folder directory and then reads in the sequence file.  "new"
just directly reads the sequence file.  But ... if you use "new" in the
default mode, it ends up calling crawl_folders(), which at a minimum
does a readdir() on every folder, so that seems to me to be a wash.

Right, so don't run in the default mode! :)

I only implemented that so it works out of the box. I've always used
it with a folders file, which my mail inc/filter script updates.

I used to use MH mainly over NFS, where reading all my gigantic
folders takes a lot of time for no good reason. If you use the normal
APIs, new is basically useless for NFS users.

Even on local disk, I expect it makes a noticeable difference. Right
now it takes 0.009s to run, with 940,047 files in 282 directories,
11,994 unread total.

Yes, we have a lot of mail here :). We have a joke that a software
engineer is a machine for turning coffee into email...

Thanks.

_______________________________________________
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>