about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
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 /lib/PublicInbox/View.pm
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 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index fa47a16a..a50cb642 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -737,7 +737,7 @@ sub indent_for {
 sub load_results {
         my ($srch, $sres) = @_;
         my $msgs = delete $sres->{msgs};
-        $srch->retry_reopen(sub { [ map { $_->ensure_metadata; $_ } @$msgs ] });
+        $srch->retry_reopen(sub { [ map { $_->mid; $_ } @$msgs ] });
 }
 
 sub msg_timestamp {