Re: [notmuch] _notmuch_message_create_for_message_id makes extra call to notmuch_data...
authorCarl Worth <cworth@cworth.org>
Fri, 27 Nov 2009 12:46:54 +0000 (04:46 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:44 +0000 (09:35 -0800)
e1/d1a858a61a60aa0e727ae77e62945e7fe0b7e5 [new file with mode: 0644]

diff --git a/e1/d1a858a61a60aa0e727ae77e62945e7fe0b7e5 b/e1/d1a858a61a60aa0e727ae77e62945e7fe0b7e5
new file mode 100644 (file)
index 0000000..698c163
--- /dev/null
@@ -0,0 +1,57 @@
+Return-Path: <cworth@cworth.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 4C48E431FC0;\r
+       Fri, 27 Nov 2009 04:47:09 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 hv+HRavk5zwV; Fri, 27 Nov 2009 04:47:08 -0800 (PST)\r
+Received: from cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 3DD3A431FAE;\r
+       Fri, 27 Nov 2009 04:47:08 -0800 (PST)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Keith Packard <keithp@keithp.com>, notmuch@notmuchmail.org\r
+In-Reply-To: <yunvdh1nfwn.fsf@aiko.keithp.com>\r
+References: <yunvdh1nfwn.fsf@aiko.keithp.com>\r
+Date: Fri, 27 Nov 2009 04:46:54 -0800\r
+Message-ID: <87iqcwqgn5.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Subject: Re: [notmuch] _notmuch_message_create_for_message_id makes extra\r
+ call to notmuch_database_find_message\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\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: Fri, 27 Nov 2009 12:47:09 -0000\r
+\r
+On Mon, 23 Nov 2009 12:29:44 -0800, Keith Packard <keithp@keithp.com> wrote:\r
+> \r
+> Looking at _notmuch_message_create_for_message_id, the first thing it\r
+> does is call notmuch_database_find_message, but the returned 'message'\r
+> is never used. I haven't tried, but I suspect this call could just be\r
+> removed.\r
+\r
+Did the "if" statement immediately afterwards just look like error\r
+checking? It's not:\r
+\r
+    message = notmuch_database_find_message (notmuch, message_id);\r
+    if (message)\r
+       return talloc_steal (notmuch, message);\r
+\r
+That's "if there's a message is in the database with this message-id,\r
+return it straight away".\r
+\r
+Or am I looking at the wrong bit of code?\r
+\r
+-Carl\r