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.
This commit is contained in:
Sebastian Spaeth 2010-03-19 08:47:14 +01:00
parent ca38848142
commit 540536b98d

View file

@ -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