* [PATCH] VIM: Improve performance of folders_render
@ 2015-01-22 20:16 Franz Fellner
2015-01-23 16:46 ` Ian Main
2015-01-23 17:20 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Franz Fellner @ 2015-01-22 20:16 UTC (permalink / raw)
To: notmuch
Simply use query.count_[messages,threads] instead of actually running
the query and using the count attribute of the result set.
---
vim/notmuch.vim | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index cb6695a..ad8b7c8 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
--
2.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] VIM: Improve performance of folders_render
2015-01-22 20:16 [PATCH] VIM: Improve performance of folders_render Franz Fellner
@ 2015-01-23 16:46 ` Ian Main
2015-01-23 17:20 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Ian Main @ 2015-01-23 16:46 UTC (permalink / raw)
To: Franz Fellner; +Cc: notmuch
Yes, LGTM. This greatly improves performance of the startup screen.
Ian
Franz Fellner wrote:
> Simply use query.count_[messages,threads] instead of actually running
> the query and using the count attribute of the result set.
> ---
> vim/notmuch.vim | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/vim/notmuch.vim b/vim/notmuch.vim
> index cb6695a..ad8b7c8 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
> --
> 2.2.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] VIM: Improve performance of folders_render
2015-01-22 20:16 [PATCH] VIM: Improve performance of folders_render Franz Fellner
2015-01-23 16:46 ` Ian Main
@ 2015-01-23 17:20 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2015-01-23 17:20 UTC (permalink / raw)
To: Franz Fellner, notmuch
Franz Fellner <alpine.art.de@gmail.com> writes:
> Simply use query.count_[messages,threads] instead of actually running
> the query and using the count attribute of the result set.
pushed to master.
d
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-23 17:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 20:16 [PATCH] VIM: Improve performance of folders_render Franz Fellner
2015-01-23 16:46 ` Ian Main
2015-01-23 17:20 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).