[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] new command lacks lock
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] new command lacks lock |
Date: |
Mon, 14 Oct 2013 22:04:08 -0400 |
>>>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.
>>
>> Ok, but it sounds like you're not scanning all of those directories, right?
>
>Sorry, I don't understand the question. As currently implemented, new
>does not scan these directories, it only opens sequence files. I
>thought you were proposing changing that.
I meant that out of your 282 directories, you're not checking them all for
new messages every time you run "new", are you? It sounded like you were
checking a subset of them.
>It offends me aesthetically though: that's a ton of wasted work.
>Reading the directories is completely unnecessary.
Understood, and I think you've convinced me. I was just unhappy about
the duplicated code to read sequence files. But I see the problem; the
sequence functions want to take a struct msgs argument, and we can't
really construct THAT without doing a readdir(). Well, I suppose we
could fake one up, but that really sounds like the wrong solution.
Let me meditate on this a bit. The solutions that jump out at me are
either create a callback for seq_read() and allow it to take a NULL
for the struct msgs pointer, or just live with the code duplication.
--Ken
- [Nmh-workers] new command lacks lock, Harvey Eneman, 2013/10/12
- Re: [Nmh-workers] new command lacks lock, Ken Hornstein, 2013/10/13
- Re: [Nmh-workers] new command lacks lock, epg, 2013/10/14
- Re: [Nmh-workers] new command lacks lock, Ken Hornstein, 2013/10/14
- Re: [Nmh-workers] new command lacks lock, Eric Gillespie, 2013/10/16
- Re: [Nmh-workers] new command lacks lock,
Ken Hornstein <=
- Re: [Nmh-workers] new command lacks lock, Ralph Corderoy, 2013/10/17
- Re: [Nmh-workers] new command lacks lock, Ken Hornstein, 2013/10/17
- Re: [Nmh-workers] new command lacks lock, Ralph Corderoy, 2013/10/17
- Re: [Nmh-workers] new command lacks lock, Ken Hornstein, 2013/10/17
- Re: [Nmh-workers] new command lacks lock, Ralph Corderoy, 2013/10/17
- Re: [Nmh-workers] new command lacks lock, Robert Elz, 2013/10/17
- Re: [Nmh-workers] new command lacks lock, Ralph Corderoy, 2013/10/17