[PATCH] tag: Automatically limit to messages whose tags will actually change.
Austin Clements
amdragon at MIT.EDU
Tue Nov 8 08:10:05 PST 2011
Quoth Dmitry Kurochkin on Nov 08 at 8:34 am:
> Hi Austin.
>
> On Mon, 7 Nov 2011 22:55:23 -0500, Austin Clements <amdragon at MIT.EDU> wrote:
> > This optimizes the user's tagging query to exclude messages that won't
> > be affected by the tagging operation, saving computation and IO for
> > redundant tagging operations.
> >
> > For example,
> > notmuch tag +notmuch to:notmuch at notmuchmail.org
> > will now use the query
> > ( to:notmuch at notmuchmail.org ) and (not tag:"notmuch")
> >
> > In the past, we've often suggested that people do this exact
> > transformation by hand for slow tagging operations. This makes that
> > unnecessary.
>
> Thanks! This is a very useful optimization.
>
> Does it work for multiple tags and tag removal? I.e.:
>
> notmuch tag -inbox -unread +sent from:dmitry.kurochkin at gmail.com
>
> can be converted to:
>
> notmuch tag -inbox -unread +sent from:dmitry.kurochkin at gmail.com and (tag:inbox or tag:unread or (not tag:sent))
Yep. This is pretty much exactly what it does.
More information about the notmuch
mailing list