about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-12-20 03:03:57 +0000
committerEric Wong <e@80x24.org>2016-12-20 08:24:25 +0000
commit478d03688600a4c7b50e205d15d76113e019f3cd (patch)
tree298f14286d684a51747c29232e9ddbc20715bab9 /t
parent1a75ba282c16f8c15b7891090d0997628d7021dc (diff)
downloadpublic-inbox-478d03688600a4c7b50e205d15d76113e019f3cd.tar.gz
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.
Diffstat (limited to 't')
-rw-r--r--t/search.t2
1 files changed, 0 insertions, 2 deletions
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('<root@s>');
         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');