[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
>outputs.
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.
--Ken
- [Nmh-workers] MH-W intro/help request, Erich Boleyn, 2014/12/01
- Re: [Nmh-workers] MH-W intro/help request, David Levine, 2014/12/01
- Re: [Nmh-workers] MH-W intro/help request, Ken Hornstein, 2014/12/01
- Re: [Nmh-workers] MH-W intro/help request, Erich Boleyn, 2014/12/02
- Re: [Nmh-workers] MH-W intro/help request, Ralph Corderoy, 2014/12/02
- Re: [Nmh-workers] MH-W intro/help request, Ken Hornstein, 2014/12/02
- Re: [Nmh-workers] MH-W intro/help request, Erich Boleyn, 2014/12/02
- Re: [Nmh-workers] MH-W intro/help request, Ralph Corderoy, 2014/12/02
- Re: [Nmh-workers] MH-W intro/help request,
Ken Hornstein <=
- Re: [Nmh-workers] MH-W intro/help request, Erich Boleyn, 2014/12/04
- Re: [Nmh-workers] MH-W intro/help request, Ralph Corderoy, 2014/12/04
- Re: [Nmh-workers] MH-W intro/help request, Ken Hornstein, 2014/12/04
- Re: [Nmh-workers] MH-W intro/help request, Ralph Corderoy, 2014/12/04
- Re: [Nmh-workers] MH-W intro/help request, Mike O'Dell, 2014/12/08
- Re: [Nmh-workers] MH-W intro/help request, Ken Hornstein, 2014/12/08
- Re: [Nmh-workers] MH-W intro/help request, Erich Boleyn, 2014/12/05
- Re: [Nmh-workers] MH-W intro/help request, Erich Boleyn, 2014/12/05
- Re: [Nmh-workers] MH-W intro/help request, Paul Fox, 2014/12/05
- Re: [Nmh-workers] MH-W intro/help request, Ralph Corderoy, 2014/12/05