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 325A76DE0C3B for ; Mon, 17 Sep 2018 05:49:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.002 X-Spam-Level: X-Spam-Status: No, score=0.002 tagged_above=-999 required=5 tests=[AWL=0.013, 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 PhNeIt5nVjnJ for ; Mon, 17 Sep 2018 05:49:41 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 3DB4A6DE0BCA for ; Mon, 17 Sep 2018 05:49:41 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1g1syB-0006fZ-M6; Mon, 17 Sep 2018 08:49:39 -0400 Received: (nullmailer pid 20851 invoked by uid 1000); Mon, 17 Sep 2018 12:49:38 -0000 From: David Bremner To: Vincent Breitmoser Cc: notmuch@notmuchmail.org Subject: Re: [PATCH 1/2] completion: more complete completion for zsh. In-Reply-To: References: <877ejk49js.fsf@tethera.net> <20180916222943.21250-1-look@my.amazin.horse> Date: Mon, 17 Sep 2018 09:49:38 -0300 Message-ID: <871s9si90d.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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: Mon, 17 Sep 2018 12:49:42 -0000 Vincent Breitmoser writes: > Ah, that's a bit annoying. > > What we could do is just stupidly load all addresses and work from there? On my > machine, `notmuch address --deduplicate=address --output=address '*'` takes 0.25 > seconds for a result set of 5500 addresses. > Here it's 1.9s for 30k addresses > Could also put that result set in the zsh completion cache, for slightly less > live but immediate results on repeated calls. Is there a simple way to figure > out on the notmuch cli if a result we received is still fresh? notmuch count --lastmod gives you the UUID (basically epoch) and lastmod count of the database. That can be optimized by specifying a non-existent search term, e.g. for me % notmuch count --lastmod to:grendel is quite a bit faster than % notmuch count --lastmod