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/database.cc | |
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/database.cc')
-rw-r--r-- | lib/database.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/database.cc b/lib/database.cc index fa632f85..e4ef14e0 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1725,7 +1725,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch, goto DONE; date = notmuch_message_file_get_header (message_file, "date"); - _notmuch_message_set_date (message, date); + _notmuch_message_set_header_values (message, date, from, subject); _notmuch_message_index_file (message, filename); } else { |