mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
Don't hash headers we won't end up using.
Just saving a little work here.
This commit is contained in:
parent
c5eea2b77e
commit
45f0d7bcab
2 changed files with 8 additions and 1 deletions
|
@ -486,6 +486,13 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
|
||||||
|
|
||||||
message = notmuch_message_open (filename);
|
message = notmuch_message_open (filename);
|
||||||
|
|
||||||
|
notmuch_message_restrict_headers (message,
|
||||||
|
"references",
|
||||||
|
"in-reply-to",
|
||||||
|
"message-id",
|
||||||
|
"date",
|
||||||
|
(char *) NULL);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
doc = Xapian::Document ();
|
doc = Xapian::Document ();
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ notmuch_message_get_header (notmuch_message_t *message,
|
||||||
contains = g_hash_table_lookup_extended (message->headers,
|
contains = g_hash_table_lookup_extended (message->headers,
|
||||||
header_desired, NULL,
|
header_desired, NULL,
|
||||||
(gpointer *) &value);
|
(gpointer *) &value);
|
||||||
if (contains)
|
if (contains && value)
|
||||||
return value;
|
return value;
|
||||||
|
|
||||||
if (message->parsing_finished)
|
if (message->parsing_finished)
|
||||||
|
|
Loading…
Reference in a new issue