From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6415D429E27 for ; Tue, 8 Nov 2011 08:07:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VNUO7jTWCjGH for ; Tue, 8 Nov 2011 08:07:34 -0800 (PST) Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU [18.7.68.37]) by olra.theworths.org (Postfix) with ESMTP id D480B431FB6 for ; Tue, 8 Nov 2011 08:07:33 -0800 (PST) X-AuditID: 12074425-b7f116d0000008fe-fa-4eb953c459e2 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id B4.AC.02302.4C359BE4; Tue, 8 Nov 2011 11:07:32 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pA8G7VNh028326; Tue, 8 Nov 2011 11:07:32 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pA8G7Uox006566 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Tue, 8 Nov 2011 11:07:31 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RNoFR-0008Gp-SB; Tue, 08 Nov 2011 11:10:05 -0500 Date: Tue, 8 Nov 2011 11:10:05 -0500 From: Austin Clements To: Dmitry Kurochkin Subject: Re: [PATCH] tag: Automatically limit to messages whose tags will actually change. Message-ID: <20111108161005.GB2658@mit.edu> References: <1320724523-23568-1-git-send-email-amdragon@mit.edu> <878vnrut9j.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878vnrut9j.fsf@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT1z0SvNPPYNkOeYurW/vZLa7fnMns wOSxc9Zddo9nq24xBzBFcdmkpOZklqUW6dslcGWsvHOLsWAOR8XG3Y0sDYx72boYOTkkBEwk Hm0/zwphi0lcuLceKM7FISSwj1Hi0M/fjBDOekaJ3496WCCcE0wSD49eZgdpERJYwijxYXZO FyMHB4uAisS6Bn+QMJuAhsS2/csZQWwRAUOJWxdfMYPYzALSEt9+NzOB2MICMRJ7v+0Gu4JX QFvifc99JoiRsRInJqxmhYgLSpyc+YQFoldL4sa/l0wgq0DmLP/HAWJyCqhLzPsZB1IhCnTA lJPb2CYwCs1C0jwLSfMshOYFjMyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdC30cjNL9FJTSjcx gkPaRXUH44RDSocYBTgYlXh4Z4ru8BNiTSwrrsw9xCjJwaQkynvSb6efEF9SfkplRmJxRnxR aU5q8SFGCQ5mJRHeNdZAOd6UxMqq1KJ8mJQ0B4uSOO/rHQ5+QgLpiSWp2ampBalFMFkZDg4l CV4mYOwKCRalpqdWpGXmlCCkmTg4QYbzAA23BqnhLS5IzC3OTIfIn2JUlBLn/ekDlBAASWSU 5sH1wlLOK0ZxoFeEeef5AlXxANMVXPcroMFMQIPbdbeBDC5JREhJNTCe+L7O2Gy904qUoLLn L3J8hO81aSSbPNp76dIW1zzndY3z+lNnlQkoVxXHyzlMuFq2Ti60dpbK7l4mYzPxx461U76v u3OxvmmHybdXjlVLnuy5cnijzdQmbttPfSdK+EyWnAvuS9ZitZ9/ppWR4wtLoZ/24z32Bn3G Lsd3reTcs+HG0lLLaHklluKMREMt5qLiRACuZ9RlFAMAAA== Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2011 16:07:34 -0000 Quoth Dmitry Kurochkin on Nov 08 at 8:34 am: > Hi Austin. > > On Mon, 7 Nov 2011 22:55:23 -0500, Austin Clements 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@notmuchmail.org > > will now use the query > > ( to:notmuch@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@gmail.com > > can be converted to: > > notmuch tag -inbox -unread +sent from:dmitry.kurochkin@gmail.com and (tag:inbox or tag:unread or (not tag:sent)) Yep. This is pretty much exactly what it does.