diff options
author | Austin Clements <amdragon@MIT.EDU> | 2011-11-06 12:17:36 -0500 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2011-11-14 17:10:58 -0400 |
commit | 567bcbc294b3aed632d18eb22056840292bdeb1e (patch) | |
tree | c3fcc5b09c88fe08e9cf3939dadf2d1694c18697 /lib/notmuch-private.h | |
parent | 9cda22c39b3ec33db09d4f5df5f59c7042658991 (diff) |
Store "from" and "subject" headers in the database.
This is a rebase and cleanup of Istvan Marko's patch from
id:m3pqnj2j7a.fsf@zsu.kismala.com
Search retrieves these headers for every message in the search
results. Previously, this required opening and parsing every message
file. Storing them directly in the database significantly reduces IO
and computation, speeding up search by between 50% and 10X.
Taking full advantage of this requires a database rebuild, but it will
fall back to the old behavior for messages that do not have headers
stored in the database.
Diffstat (limited to 'lib/notmuch-private.h')
-rw-r--r-- | lib/notmuch-private.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 0d3cc27e..60a932fc 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -93,7 +93,9 @@ NOTMUCH_BEGIN_DECLS typedef enum { NOTMUCH_VALUE_TIMESTAMP = 0, - NOTMUCH_VALUE_MESSAGE_ID + NOTMUCH_VALUE_MESSAGE_ID, + NOTMUCH_VALUE_FROM, + NOTMUCH_VALUE_SUBJECT } notmuch_value_t; /* Xapian (with flint backend) complains if we provide a term longer @@ -269,9 +271,10 @@ void _notmuch_message_ensure_thread_id (notmuch_message_t *message); void -_notmuch_message_set_date (notmuch_message_t *message, - const char *date); - +_notmuch_message_set_header_values (notmuch_message_t *message, + const char *date, + const char *from, + const char *subject); void _notmuch_message_sync (notmuch_message_t *message); |