From 540536b98d5bbae84b62dbe03992708d0cff9c43 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Fri, 19 Mar 2010 08:47:14 +0100 Subject: [PATCH 1/1] notmuch: Use Query.count_messages() rather len(Query.search_messages()) In my tests, this is about 10 times faster and returned the same results, although both operations are really fast. --- notmuch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notmuch b/notmuch index 6e41fa21..5fc98bbe 100755 --- a/notmuch +++ b/notmuch @@ -149,7 +149,8 @@ if __name__ == '__main__': #mangle arguments wrapping terms with spaces in quotes querystr = quote_query_line(sys.argv[2:]) logging.debug("count "+querystr) - print(len(Query(db,querystr).search_messages())) + print(Query(db,querystr).count_messages()) + #------------------------------------- elif sys.argv[1] == 'tag': #build lists of tags to be added and removed -- 2.43.0