[PATCH] How to improve the mail handling workflow?

Michal Sojka sojkam1 at fel.cvut.cz
Mon Nov 15 00:00:32 PST 2010


On Sat, 13 Nov 2010, Darren McGuicken wrote:
> On Sat, 13 Nov 2010 07:05:58 +0100, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> > I agree with you in that in many cases tags can be replaced by saved
> > searches. Last time I did it, i.e. used saved searches to distinguish
> > messages from different mailing lists, the result was that it took
> > very long time (something like 5 seconds) to show notmuch-hello
> 
> Interesting, what Xapian backend are you using?  I moved to chert after
> id:"87ocl1lut1.fsf at yoom.home.cworth.org" and my notmuch-hello with 15
> saved searches appears in a couple of seconds when freshly loaded,
> faster when switching back to it after use.  

I use chert as well.

> That may well be slower than just tag searches but it's not yet at a
> threshold where I notice it. How many searches had you saved?

I had 45 (or so). I wanted two searches for every mailing list. One 
"tag:inbox and (...)" and the second only "...".
> 
> > Additionally, I compared the speed of command line searches for tags
> > and for the whole email addresses and even without the bug mentioned
> > above, the search for to: is usually slower than the search for tag:.
> 
> Very non-scientifically just using time and vm/drop_caches on my
> netbook, having tagged all mail sent to the list address with 'notmuch',
> I seem to get much the same performance:
> 
>    $ time notmuch search tag:notmuch > /dev/null
> 
>    real    0m21.074s
>    user    0m4.740s    
>    sys     0m1.916s
> 
>    $ time notmuch search to:notmuch > /dev/null
> 
>    real    0m20.280s
>    user    0m4.600s
>    sys     0m2.048s
> 
>    $ time notmuch search to:notmuch at notmuchmail.org > /dev/null
> 
>    real    0m21.790s
>    user    0m5.044s
>    sys     0m2.008s

My current numbers (with hot cache) are bellow.

$ time notmuch count tag:notmuch                                                                                                                                                                                             
3243
0,00s user 0,00s system 72% cpu 0,011 total
$ time notmuch count to:notmuch at notmuchmail.org                                                                                                                                                                              
2477
0,03s user 0,00s system 89% cpu 0,036 total

That is 36ms vs. 11ms. If these numbers are multiplied by 45 (or by 90
with the bug in notmuch hello), this makes the difference.

-Michal


More information about the notmuch mailing list