]> Sergey Matveev's repositories - public-inbox.git/commitdiff
search: favor skeleton DB for lookup_mail
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Sun, 4 Mar 2018 20:04:29 +0000 (20:04 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Mon, 5 Mar 2018 20:00:58 +0000 (20:00 +0000)
The skeleton DB is smaller and hit more frequently given the
homepage and per-message/thread views; so it will be hotter in
the page cache.

lib/PublicInbox/Search.pm

index 4dc274723d6ca8e34ca19821256308d47ea7058d..dc46ead0e6b0166ea2d0e6febf3e8fa442ea2fbb 100644 (file)
@@ -381,7 +381,7 @@ sub lookup_message {
 sub lookup_mail { # no ghosts!
        my ($self, $mid) = @_;
        retry_reopen($self, sub {
-               my $smsg = lookup_message($self, $mid) or return;
+               my $smsg = lookup_skeleton($self, $mid) or return;
                $smsg->load_expand;
        });
 }