[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] MH-W intro/help request

From: Ken Hornstein
Subject: Re: [Nmh-workers] MH-W intro/help request
Date: Tue, 02 Dec 2014 13:36:14 -0500

>Specifically, I was testing it on a very large folder of approx 100K
>messages.  Both the "mark ..." and a "show N" invokation take about
>the more than 1/10th of a second on average, even for extremely short

Okay, yeah, THAT makes sense.  Pretty much every command calls folder_read(),
and I am 99% sure the problem there is doing a readdir() on that super huge
directory (it's not performing a stat() on every file, though).  Obviously
the output size isn't the problem.  Note that maybe the problem is we do
something stupid with malloc or something else; it might be interesting
to see how long things like "ls" take in that directory (running ls without
stat()ing any files, of course); if it's significantly faster then maybe
we can do better.

We're kind of in a tough spot here.  Sequences can contain entries for
messages that don't exist; the way that gets resolved is by reading the
directory and removing any files from the sequence list when the folder
data structure is built. mark(1) isn't just reading the sequence file
and printing out the exact line; it's calling seq_print(), which is
the same routine that the sequence routines use to output the sequence
structure.  Getting the sequence list without actually reading the
folder ... well, it's possible, but it would require some surgery.

I did see a web page suggested speeding up readdir() by replacing it
with direct calls to getdents() with a larger buffer size; I'm not
sure I want to do that either, as direct usage of getdents() isn't
portable.  I'm open to suggestions here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]