RE: [PATCH] VIM: Improve performance of folders_render
authorIan Main <imain@redhat.com>
Fri, 23 Jan 2015 16:46:56 +0000 (08:46 +1600)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:47:44 +0000 (14:47 -0700)
da/fda6d75bc44d1ea24fae70bf507d6b98ac9a06 [new file with mode: 0644]

diff --git a/da/fda6d75bc44d1ea24fae70bf507d6b98ac9a06 b/da/fda6d75bc44d1ea24fae70bf507d6b98ac9a06
new file mode 100644 (file)
index 0000000..2c813d0
--- /dev/null
@@ -0,0 +1,94 @@
+Return-Path: <imain@redhat.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 3296C431FBC\r
+       for <notmuch@notmuchmail.org>; Fri, 23 Jan 2015 08:47:06 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.562\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.562 tagged_above=-999 required=5\r
+       tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_HI=-5]\r
+       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 yP9-aQ8sV9Y5 for <notmuch@notmuchmail.org>;\r
+       Fri, 23 Jan 2015 08:47:03 -0800 (PST)\r
+Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id DD35A431FC9\r
+       for <notmuch@notmuchmail.org>; Fri, 23 Jan 2015 08:47:02 -0800 (PST)\r
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com\r
+       (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])\r
+       by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0NGkxjR028783\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\r
+       verify=FAIL); Fri, 23 Jan 2015 11:46:59 -0500\r
+Received: from localhost.localdomain (ovpn-113-119.phx2.redhat.com\r
+       [10.3.113.119])\r
+       by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP\r
+       id t0NGkvG0006074\r
+       (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO);\r
+       Fri, 23 Jan 2015 11:46:57 -0500\r
+Date: Fri, 23 Jan 2015 08:46:56 -0800\r
+From: Ian Main <imain@redhat.com>\r
+To: Franz Fellner <alpine.art.de@gmail.com>\r
+Message-ID: <54c27b00aa954_3921f3b3308@ovo.mains.priv.notmuch>\r
+In-Reply-To: <1421957807-26273-1-git-send-email-alpine.art.de@gmail.com>\r
+References: <1421957807-26273-1-git-send-email-alpine.art.de@gmail.com>\r
+Subject: RE: [PATCH] VIM: Improve performance of folders_render\r
+Mime-Version: 1.0\r
+Content-Type: text/plain;\r
+ charset=utf-8\r
+Content-Transfer-Encoding: 7bit\r
+Attach: \r
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23\r
+Cc: notmuch@notmuchmail.org\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: Fri, 23 Jan 2015 16:47:06 -0000\r
+\r
+Yes, LGTM.  This greatly improves performance of the startup screen.\r
+\r
+    Ian\r
+\r
+Franz Fellner wrote:\r
+> Simply use query.count_[messages,threads] instead of actually running\r
+> the query and using the count attribute of the result set.\r
+> ---\r
+>  vim/notmuch.vim | 2 +-\r
+>  1 file changed, 1 insertion(+), 1 deletion(-)\r
+> \r
+> diff --git a/vim/notmuch.vim b/vim/notmuch.vim\r
+> index cb6695a..ad8b7c8 100644\r
+> --- a/vim/notmuch.vim\r
+> +++ b/vim/notmuch.vim\r
+> @@ -644,7 +644,7 @@ ruby << EOF\r
+>                                      q.add_tag_exclude(t)\r
+>                              }\r
+>                              $searches << search\r
+> -                            count = count_threads ? q.search_threads.count : q.search_messages.count\r
+> +                            count = count_threads ? q.count_threads : q.count_messages\r
+>                              b << "%9d %-20s (%s)" % [count, name, search]\r
+>                      end\r
+>              end\r
+> -- \r
+> 2.2.1\r
+> \r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+\r
+\r