Don't hash headers we won't end up using.

Just saving a little work here.
This commit is contained in:
Carl Worth 2009-10-19 13:48:13 -07:00
parent c5eea2b77e
commit 45f0d7bcab
2 changed files with 8 additions and 1 deletions

View file

@ -486,6 +486,13 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
message = notmuch_message_open (filename);
notmuch_message_restrict_headers (message,
"references",
"in-reply-to",
"message-id",
"date",
(char *) NULL);
try {
doc = Xapian::Document ();

View file

@ -241,7 +241,7 @@ notmuch_message_get_header (notmuch_message_t *message,
contains = g_hash_table_lookup_extended (message->headers,
header_desired, NULL,
(gpointer *) &value);
if (contains)
if (contains && value)
return value;
if (message->parsing_finished)