Re: [notmuch] Mail in git
authorBen Gamari <bgamari@gmail.com>
Wed, 17 Feb 2010 15:03:36 +0000 (10:03 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:13 +0000 (09:36 -0800)
20/25334dd119ffbaf3a203dbdefdd151e8969f5f [new file with mode: 0644]

diff --git a/20/25334dd119ffbaf3a203dbdefdd151e8969f5f b/20/25334dd119ffbaf3a203dbdefdd151e8969f5f
new file mode 100644 (file)
index 0000000..5af8de2
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <bgamari@gmail.com>\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 2959D431FBC\r
+       for <notmuch@notmuchmail.org>; Wed, 17 Feb 2010 07:03:44 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.866\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.866 tagged_above=-999 required=5\r
+       tests=[AWL=-0.867, BAYES_50=0.001] autolearn=ham\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 ERE6rLUVQOBE for <notmuch@notmuchmail.org>;\r
+       Wed, 17 Feb 2010 07:03:43 -0800 (PST)\r
+Received: from mail-pz0-f193.google.com (mail-pz0-f193.google.com\r
+       [209.85.222.193])\r
+       by olra.theworths.org (Postfix) with ESMTP id 53904431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 17 Feb 2010 07:03:43 -0800 (PST)\r
+Received: by pzk31 with SMTP id 31so5427729pzk.32\r
+       for <notmuch@notmuchmail.org>; Wed, 17 Feb 2010 07:03:42 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:received:received:content-type:subject:from:to\r
+       :in-reply-to:references:date:message-id:user-agent\r
+       :content-transfer-encoding;\r
+       bh=ubGg4GMtqtlMfF9Q4QNYsCwrmpzy2GgvOsyF38MmHP0=;\r
+       b=VtjX1ZIi9sxWlCq0WYGNKkH1cIrgPSdQXnuHthbmSv1cODl1ODZNAONWhEeC/XMSHp\r
+       q69aWheZe/fhDEaZr1yDQxEVzMBeML+ZjOqYvmrqsdZiaF4Yuj61T7syeDYRzlBdszlA\r
+       nfwhVwIn1qSfPCi4JwTdYRf10JqpVIosjXncA=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=content-type:subject:from:to:in-reply-to:references:date:message-id\r
+       :user-agent:content-transfer-encoding;\r
+       b=epSUHqhC5QxjTMU5dw2uMb6Q6ldcR5TjhFOCZ859qsNzPqMDPiPmzQm7Ek0UQWY9+G\r
+       zkON9CJwRa+EpVAzzdRBfXs4J98RKpM1l9ml6OGZysB2NKhpI7Yw2e+mCb8Pfwafq9db\r
+       FQiWbMmE2gteR8oxsw6IC0xRJf9iCOiH8UdIc=\r
+Received: by 10.140.55.4 with SMTP id d4mr5353505rva.117.1266419022448;\r
+       Wed, 17 Feb 2010 07:03:42 -0800 (PST)\r
+Received: from localhost (umass-959-129.wireless.umass.edu [128.119.77.129])\r
+       by mx.google.com with ESMTPS id 15sm2628108pwi.0.2010.02.17.07.03.38\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Wed, 17 Feb 2010 07:03:40 -0800 (PST)\r
+Content-Type: text/plain; charset=UTF-8\r
+From: Ben Gamari <bgamari@gmail.com>\r
+To: notmuch <notmuch@notmuchmail.org>\r
+In-reply-to: <20100217012101.GD8249@lapse.rw.madduck.net>\r
+References: <20100215002914.GA22402@flamingspork.com>\r
+       <20100217012101.GD8249@lapse.rw.madduck.net>\r
+Date: Wed, 17 Feb 2010 10:03:36 -0500\r
+Message-Id: <1266418124-sup-6308@ben-laptop>\r
+User-Agent: Sup/git\r
+Content-Transfer-Encoding: 8bit\r
+Subject: Re: [notmuch] Mail in git\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: Wed, 17 Feb 2010 15:03:44 -0000\r
+\r
+Excerpts from martin f krafft's message of Tue Feb 16 20:21:01 -0500 2010:\r
+> What I am wondering is if (explicit) tags couldn't be represented as\r
+> tree-objects with this.\r
+> \r
+>   evenless-link   — link a message object with a tree object\r
+>   evenless–unlink – unlink a message object from tree object\r
+>     [replaces evenless-unlink]\r
+\r
+I was actually wondering this very thing. I'd just be worried about tags\r
+with large numbers of messages (presumably we would need an All tag,\r
+that would contain a reference to every known message). It seems like\r
+the simple act of adding a message to the repository could turn into an\r
+extremely expensive operation.\r
+\r
+Moreover, deleting a message could also be quite expensive as this will\r
+require rewriting all of the tags that reference it. Surely, we would\r
+need to batch these sort of operations to avoid disasterous performance.\r
+\r
+However, even with batching, it seems we would face some pretty serious\r
+scalability issues. I think if we were to implement tag storage in\r
+trees, we'd need to use a multi-level tree. This way we could avoid\r
+rewriting a tree object containing all of the tag's messages on every\r
+change. I apologize if this was already obvious to everyone but me.\r
+\r
+> \r
+> messages would then be deleted whenever using git-gc.\r
+> \r
+> No idea how this would sync if we don't keep ancestry. Otoh, it\r
+> would probably not be very expensive to do just that.\r
+\r
+I think that keeping the ancestry would be quite important and would\r
+come with relatively low overhead given the correct dereferencing of\r
+data structures.\r
+\r
+> \r
+> notmuch would then only search and provide the hash ID(s); tags\r
+> would be a function of storage.\r
+> \r
+> Is it possible to find out all trees that reference a given object\r
+> with Git in constant or sub-linear time?\r
+> \r
+I don't believe so. I think this is one of the reasons why git gc is so\r
+expensive.\r
+\r
+- Ben\r