summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Spaeth <sebastian@sspaeth.de>2010-03-19 08:47:14 +0100
committerSebastian Spaeth <sebastian@sspaeth.de>2010-03-19 08:47:14 +0100
commit540536b98d5bbae84b62dbe03992708d0cff9c43 (patch)
treeb718ace17bdaade49d6fbf2d9b501b8b7f68bec5
parentca388481428cd7dfa5e75c474567e6880c2ce60f (diff)
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.
-rwxr-xr-xnotmuch3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch b/notmuch
index 6e41fa2..5fc98bb 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