[PATCH] VIM: Improve performance of folders_render
Franz Fellner 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
Re: [PATCH] VIM: Improve performance of folders_render
Franz Fellner 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 ___ notmuch mailing list [email protected] http://notmuchmail.org/mailman/listinfo/notmuch
RE: [PATCH] VIM: Improve performance of folders_render
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 > [email protected] > http://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list [email protected] http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] VIM: Improve performance of folders_render
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 at notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] 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. --- 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
[PATCH] 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. --- 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 [email protected] http://notmuchmail.org/mailman/listinfo/notmuch
