From 478d03688600a4c7b50e205d15d76113e019f3cd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 20 Dec 2016 03:03:57 +0000 Subject: searchmsg: remove ensure_metadata Instead, only preload the ->mid field for threading, as we only need ->thread and ->path once in Search->get_thread (but we will need the ->mid field repeatedly). This more than doubles View->load_results performance on according to thread-all on an inbox with over 300K messages. --- t/search.t | 2 -- 1 file changed, 2 deletions(-) (limited to 't') diff --git a/t/search.t b/t/search.t index eed9c9b6..c16811d8 100644 --- a/t/search.t +++ b/t/search.t @@ -109,7 +109,6 @@ sub filter_mids { my $found = $ro->lookup_message(''); ok($found, "message found"); is($root_id, $found->{doc_id}, 'doc_id set correctly'); - $found->ensure_metadata; is($found->mid, 'root@s', 'mid set correctly'); ok(int($found->thread_id) > 0, 'thread_id is an integer'); @@ -290,7 +289,6 @@ sub filter_mids { body => "LOOP!\n")); ok($doc_id > 0, "doc_id defined with circular reference"); my $smsg = $rw->lookup_message('circle@a'); - $smsg->ensure_metadata; is($smsg->references, '', "no references created"); my $msg = PublicInbox::SearchMsg->load_doc($smsg->{doc}); is($s, $msg->subject, 'long subject not rewritten'); -- cgit v1.2.3-24-ge0c7