From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id AABC96DE3099 for ; Thu, 22 Jun 2017 13:15:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.428 X-Spam-Level: X-Spam-Status: No, score=-0.428 tagged_above=-999 required=5 tests=[AWL=-0.106, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.211, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k3R89acyOlUZ for ; Thu, 22 Jun 2017 13:15:41 -0700 (PDT) Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) by arlo.cworth.org (Postfix) with ESMTPS id 051046DE3098 for ; Thu, 22 Jun 2017 13:15:41 -0700 (PDT) Received: by mail-pf0-f172.google.com with SMTP id e7so13572142pfk.0 for ; Thu, 22 Jun 2017 13:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=1WlT+W4aTmngY5fqyLN8ZSgE2lXJ8sxHhvGDKcuT54k=; b=nrvi1AAigxbjZqbefedp8ZrYZQUo9YTxIrtpgkhVCS60MiD6LMBqWa0CCrIOZd0XX/ cE5I9M6VIF0fyJeEDMgKWCVfsoewoBVwJDs00dDhkZ4XMAsVTBsK8j2LmeV8pkyR/6SI 0iZ+vlPaBwULlJg1yZlMptaqbkMq1UIqFPTM35qH+h7kWqHQ+zZf+y5VEC46VGSFyckH YouyhTvfEIm/JO0BbVhcSFJIdbtaG/ca8pfp82DgBJyrRAWmi7L0PERL/ZOyUXxLYWN4 daOf23vbr83PX5f8P9/6+g6mboAEP75pe86Jrd4f1aLKZxuOBuNynCBr3SLF9T+nf5gT rK9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=1WlT+W4aTmngY5fqyLN8ZSgE2lXJ8sxHhvGDKcuT54k=; b=de2JpDsvrqgOyzMY9MhNW8yghrFS/Xb6Zf2kvvn4IPaaNzY7ajAqCmLnEFieeTmHRv z/waSXCysogk34pt9k3z70/d5N1XMtdRFvJlJ70GmM0uOaCF1h60YkzsGl9tVWGqF8UB ps2tGiDjCOmaAzOMgvCxcTjz/2HqgvC+Zdd/OCm0N/Cg+QaWFq81GAjL9ZhfCDruAwRK rNVlEHH7dfG61D07mlcr717h0PK4p6NeswRCdXyz1Xrxz0NS5THsU1ymMrs56a0ddxve CKPZqFXdWuOkfm8e108l/nJbtJeTIXGkOgdJWS66VaHc13tBsk/pQjD4tjQwIIgbPox7 GXIA== X-Gm-Message-State: AKS2vOznBRANd7AMmnGVa037CyZVj5Er1A2vLdQaIkKA/bslvvcrHIPt o5fDHvZ+R/qydClV X-Received: by 10.84.129.111 with SMTP id 102mr4893046plb.221.1498162540533; Thu, 22 Jun 2017 13:15:40 -0700 (PDT) Received: from marmstrong-linux.kir.corp.google.com ([2620:0:1008:11:c96e:1743:c20f:75c4]) by smtp.gmail.com with ESMTPSA id u194sm5587570pgb.24.2017.06.22.13.15.39 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 22 Jun 2017 13:15:39 -0700 (PDT) From: Matt Armstrong To: Daniel Kahn Gillmor , Gaute Hope , David Bremner , notmuch@notmuchmail.org, Xu Wang Subject: Re: find threads where I and Jian participated but not Dave In-Reply-To: <87r2ydgh9t.fsf@fifthhorseman.net> References: <87bmprtqgo.fsf@tethera.net> <87fuf1nnl5.fsf@fifthhorseman.net> <8737b1rojw.fsf@tethera.net> <1497594312.ahjx44w937.astroid@strange.none> <87r2ydgh9t.fsf@fifthhorseman.net> Date: Thu, 22 Jun 2017 13:15:38 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Thu, 22 Jun 2017 20:15:41 -0000 Daniel Kahn Gillmor writes: > On Wed 2017-06-21 13:04:53 -0700, Matt Armstrong wrote: >> For what it is worth, I've found this idea from Daniel intriguing and >> pretty useful in practice: >> >> "show me threads in which i've participated, where there are some >> messages flagged with 'inbox'" >> >> I implement it like this in my post-new hook: >> >> # All messages in threads in which I participate get tag:participated >> notmuch search --output=threads from:marmstrong | \ >> sed -e 's,^,+participated -- ,' | \ >> notmuch tag --batch > > cool, thx for the suggestion. > > the "notmuch search" part of the pipeline alone takes ~19s (wall time, > and actual CPU time) for me though :/ It returns 30504 threads! how > many threads do you get? The query returns 6600 threads. I'm getting 2 seconds wall clock time. > you're effectively re-tagging every single message in every participated > thread every time you run "notmuch new", right? Yeah, the "batch script" that the above search+sed creates and pipes into "notmuch tag --batch" is 265K, but it only takes 0.5 seconds to execute. My understanding is that "notmuch tag" is smart enough to do no work if the tag is already present on a message, so the only changes happening in the database are actually for new stuff.