mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 19:08:09 +01:00
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:
parent
ca38848142
commit
540536b98d
1 changed files with 2 additions and 1 deletions
3
notmuch
3
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
|
||||
|
|
Loading…
Reference in a new issue