diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2010-04-16 08:38:48 +0200 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-04-21 16:06:09 -0700 |
commit | 40ff2ab62a4b1b4a5fad4cc8c102afb09135b9ca (patch) | |
tree | 5f0bf00ef7ad8e40250a62e6a73c80af74e8c9c6 | |
parent | aadb15a002dc01903d60ca40048d6d4ef3990863 (diff) |
notmuch-tag: don't sort messages before applying tag changes
It's not neccessary to sort the results before we apply tags. Xapian
contributor Olly Betts says that savings might be bigger with a cold
file cache and (as unsorted implies really sorted by document id) a better
cache locality when applying tags to messages.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
-rw-r--r-- | notmuch-tag.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/notmuch-tag.c b/notmuch-tag.c index 8b6f7dc..fd54bc7 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -107,6 +107,9 @@ notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[])) return 1; } + /* tagging is not interested in any special sort order */ + notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED); + for (messages = notmuch_query_search_messages (query); notmuch_messages_valid (messages) && !interrupted; notmuch_messages_move_to_next (messages)) |