From: Franz Fellner Date: Thu, 22 Jan 2015 20:16:47 +0000 (+0100) Subject: VIM: Improve performance of folders_render X-Git-Tag: 0.20~84 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=ce9f559b8642e0cc2eaffbf9dea9b3cbd46ee30d VIM: Improve performance of folders_render Simply use query.count_[messages,threads] instead of actually running the query and using the count attribute of the result set. --- diff --git a/vim/notmuch.vim b/vim/notmuch.vim index cb6695a8..ad8b7c80 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -644,7 +644,7 @@ ruby << EOF q.add_tag_exclude(t) } $searches << search - count = count_threads ? q.search_threads.count : q.search_messages.count + count = count_threads ? q.count_threads : q.count_messages b << "%9d %-20s (%s)" % [count, name, search] end end