-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kill filter could be optimized #319
Comments
Hey @anarcat ,
The way filters works in afew is to get a list of threads or mails and loop on them to push the tags / stuff you want. |
Yes, that is the part I am saying is slow. :)
This query is faster, and tags all affected threads at once, without having to iterate over all threads:
|
Hey @anarcat Please open a pull-request with this. |
From the notmuch docs (https://notmuchmail.org/doc/latest/man7/notmuch-search-terms.html):
So it should be OK either way. |
While that is true, xapian queries are fast. Notmuch "expands" that query in pure C, whereas afew loops in python and goes through the python API to notmuch each time. That does make quite a difference - it should be okay for a limited number of "new" messages, and is probably quite slow on your full mail db. |
running the kill filter with
--verbose --verbose
, I noticed the following:.. ad nauseum. that feels really slow! here I have this simple rule:
(the
not tag:inbox
is yournot tag:new
). it seems to me that would work as well and wouldn't need to enumerate every thread in the query?The text was updated successfully, but these errors were encountered: