>>>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 mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
