Re: nomuch_addresses.py
authorDaniel Schoepe <daniel@schoepe.org>
Tue, 21 Feb 2012 13:53:06 +0000 (14:53 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:46 +0000 (09:44 -0800)
06/7d7a1fde12e4952ec79d08ce3cfca872428bfe [new file with mode: 0644]

diff --git a/06/7d7a1fde12e4952ec79d08ce3cfca872428bfe b/06/7d7a1fde12e4952ec79d08ce3cfca872428bfe
new file mode 100644 (file)
index 0000000..de0ab31
--- /dev/null
@@ -0,0 +1,155 @@
+Return-Path: <daniel@schoepe.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 40F61431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Feb 2012 05:53:24 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.8\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id nUpRQO2G-BRG for <notmuch@notmuchmail.org>;\r
+       Tue, 21 Feb 2012 05:53:20 -0800 (PST)\r
+Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com\r
+       [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 867AB431FAE\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Feb 2012 05:53:20 -0800 (PST)\r
+Received: by eaak14 with SMTP id k14so3609646eaa.26\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Feb 2012 05:53:19 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of daniel@schoepe.org designates\r
+       10.14.45.80 as permitted sender) client-ip=10.14.45.80; \r
+Authentication-Results: mr.google.com;\r
+       spf=pass (google.com: domain of daniel@schoepe.org\r
+       designates 10.14.45.80 as permitted sender)\r
+       smtp.mail=daniel@schoepe.org;\r
+       dkim=pass header.i=daniel@schoepe.org\r
+Received: from mr.google.com ([10.14.45.80])\r
+       by 10.14.45.80 with SMTP id o56mr8482815eeb.88.1329832399241 (num_hops\r
+       = 1); Tue, 21 Feb 2012 05:53:19 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type;\r
+       bh=wfPtkw7qM5lO1/XjeJMZnXkxMsWcdOnpcK7/RuEwluU=;\r
+       b=bkQtZeiCRF+dFRaz+qUhsejx0an0jn6s6WB204Bzf6dBBPf8HhEvXBnn681tasTX/u\r
+       VDeSUwRveCTmUuyd6TqfAHWO9uu31zZrcvHfk+8LvvapGuFXI80WtCp1lzFrxmqoXiFF\r
+       vUMPtlRQkKAbxYDJnlPrhXX2XLpso/0xNcigQ=\r
+Received: by 10.14.45.80 with SMTP id o56mr6725463eeb.88.1329832399085;\r
+       Tue, 21 Feb 2012 05:53:19 -0800 (PST)\r
+Received: from localhost (p4FC78DCA.dip0.t-ipconnect.de. [79.199.141.202])\r
+       by mx.google.com with ESMTPS id s48sm87896441eem.0.2012.02.21.05.53.17\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Tue, 21 Feb 2012 05:53:17 -0800 (PST)\r
+From: Daniel Schoepe <daniel@schoepe.org>\r
+To: Justus Winter <4winter@informatik.uni-hamburg.de>,\r
+       Philippe LeCavalier <support@plecavalier.com>, notmuch@notmuchmail.org\r
+Subject: Re: nomuch_addresses.py\r
+In-Reply-To: <20120221091509.8534.59492@thinkbox.jade-hamburg.de>\r
+References: <87r4xur3rv.fsf@plc.plecavalier.com>\r
+       <87fweamenf.fsf@schoepe.localhost>\r
+       <20120221091509.8534.59492@thinkbox.jade-hamburg.de>\r
+User-Agent: Notmuch/0.11.1+210~ge886eec (http://notmuchmail.org)\r
+       Emacs/24.0.93.1 (x86_64-pc-linux-gnu)\r
+Date: Tue, 21 Feb 2012 14:53:06 +0100\r
+Message-ID: <87zkccjnst.fsf@schoepe.localhost>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-Gm-Message-State:\r
+ ALoCoQlvryTuWvwyHgiVuqWwaGiO/OzSdZZj6r/wAVy3IdPbE0f5PTTWQ4Y4MwNG0Mc00qO88gBh\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 21 Feb 2012 13:53:24 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Tue, 21 Feb 2012 09:15:09 -0000, Justus Winter <4winter@informatik.uni-h=\r
+amburg.de> wrote:\r
+> Quoting Daniel Schoepe (2012-02-17 02:28:52) [emphasis mine]:\r
+> >Just for completeness: I'm using the nice nottoomuch-addresses.pl script\r
+> >[1] by Tomi Ollila *which doesn't require any bindings* and is incredibly\r
+> >fast (after generating an initial address database).\r
+>=20\r
+> I don't get it. The perl script isn't using any library bindings,\r
+> mainly because there are no libnotmuch bindings for perl. *But* it\r
+> does call the notmuch binary which is worse:\r
+\r
+I think that emphasis you added may be a bit misleading:\r
+\r
+I specifically mentioned that it doesn't need bindings, because the\r
+initial problem in this thread had to do with missing bindings, not\r
+because I think it's inherently a good thing.\r
+\r
+The reason I mentioned nottoomuch-addresses at all, is that completion\r
+itself is _a lot_ faster (at least for me), compared to\r
+addrlookup. According to the wiki, notmuch-addresses.py is even slower\r
+than addrlookup, so I thought (and still think) that it was worth\r
+mentioning. Of course, one could rewrite the database-generation part in\r
+python using the bindings, but I personally don't think it's that\r
+necessary.\r
+\r
+> * incredibly high overhead (fork&exec) compared to a simple function\r
+>   call (plus maybe some kind of ffi)\r
+\r
+I think nottoomuch-addresses.sh is a good example how such performance\r
+considerations can be outweighed by choosing a good "algorithm" instead\r
+(extracting all addresses beforehand).\r
+\r
+> * manual and error prone serialization of ''function arguments''\r
+> * manual and error prone deserialization of ''return values''\r
+> * very limited error reporting and handling capabilities\r
+> * any kind of resource (think handle to a xapian database) is lost if\r
+>   the process exists resulting in further overhead if the binary is\r
+>   called multiple times\r
+>=20\r
+> I do get the feeling that it is perceived as desirable not to require\r
+> any kind of notmuch bindings (David once said something similar about\r
+> nmbug).\r
+\r
+While I don't think that using bindings is a bad thing, the fact that we\r
+can do non-trivial things like nmbug without them, seems to be a good\r
+indicator for the quality of the command line interface though. (And\r
+hence notmuch lends itself well to being used in shell scripts).\r
+\r
+Cheers,\r
+Daniel\r
+\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iQIcBAEBAgAGBQJPQ6HCAAoJEIaTAtce+Z+JD5IQAIw+UtQfNS8MRx52YTgirM01\r
+X7WBznp2k8r9J5n/ii2ZrE9/nkfwc2MGWJ9F7sbdijGvwUy+M2vFHgUSow6xRmud\r
+nVkIs7XBH/YLG927BloiM3QRmgJuwoqJLJyPWniS4Xc2q0D1QUXDVeSwzLwHD9uL\r
+SqW3q2gLbo5ZmV716n3YUnEzYl4+cyEv5bod91qYQM8fm4mFo5JcJ4EajjP3Rz5Y\r
+2OFf5Ou8iK9fJGQXeVXtvYtd0tpMoD7WXS56zbJ8fbRdGTABiGORxQc0VGZob2Si\r
+hJ0+/sss7BjYbUZgN3HSjlENVtCGuEZD4ioL8J0IKgYKr+vWs7lzSwp8aNK/Gm4Q\r
+Fukco/H10wrMvhGv9YqXz+mn4lLFYWlO1HzYRicwPjueu46sNDmPU/cMefUIDonf\r
+DKzxhGOGQgTpBIuIn9+VDuNHBU0mWehq8hcrHb1byFeRW817UB5ouK3r5paRqY/1\r
+/XueSd7CD9gfi6bV01r2jQ8zxnOmisHVWjZq3DsyN7g8skpJtpybILLfQUIlhqHi\r
+yuZJLkn2m47tY5dnmDyBeN22PiuNy22PuLUEQfM/w2NaxFxWUgI5W8VxtiKRgSCz\r
+hQyvFJhliFebDs/AybOKTfG0tCWBdve9NTAtSv4rT2H9nnNzC71xl4ae39IOB91e\r
+vZBT/7aJ9FRxlolFi8L8\r
+=3Cc/\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r