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. --- lib/PublicInbox/View.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/View.pm') 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 { -- cgit v1.2.3-24-ge0c7