Re: Slowness (search opens every email file?)

Subject: Re: Slowness (search opens every email file?)

Date: Tue, 12 Jul 2011 20:50:56 -0400

To: Notmuch Mail, Istvan Marko

Cc:

From: Austin Clements


On Tue, Jul 12, 2011 at 4:24 PM, Jason Woofenden <jason@jasonwoof.com> wrote:
> On 2011-07-11 06:13PM, Austin Clements wrote:
>> On Mon, Jul 11, 2011 at 3:07 PM, Jason Woofenden <jason@jasonwoof.com> wrote:
>> > notmuch search tag:foo is slow!
>> >
>> > (when my e-mail files are not already in the disk cache)
>> >
>> > I saw on my activity monitor applet that it was using mostly i/o,
>> > and started to wonder if it was opening every e-mail. I little work
>> > with strace and searching revealed that this command was opening
>> > many many e-mail files from my maildir(s). I spent a little while
>> > digging around in the notmuch source, and didn't see where it was
>> > opening the email files.
>>
>> It is opening every file to get a few headers to display in the search
>> output.  Istvan Marko sent an experimental patch to store these
>> headers in the database a while ago, though as far as I know there
>> hasn't been any progress cleaning it up for inclusion:
>> id:"m3sjsv2kw2.fsf@zsu.kismala.com" .
>
> Cool. I suspected it was reading for header files.
>
> I googled the id and found this patchwork link:
>
> http://patchwork.notmuchmail.org/patch/947/
>
> (I didn't see any way to ask mailman for a message id.)

Here's the full thread from Nabble:
http://notmuch.198994.n3.nabble.com/storing-From-and-Subject-in-xapian-td2901262.html

> Does someone want to work at this soon or should I try my hand at
> it?

Istvan, did you make any progress on this patch since the last
version?  I seem to recall it just needed general cleanup (code style
and such) and a better answer for backwards compatibility (the
unfortunate " " thing).

Thread: