about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchView.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-02-15 09:46:37 +0000
committerEric Wong <e@yhbt.net>2020-02-16 00:06:43 +0000
commit5d5789076ed4da7502ff18748d1553c899b78907 (patch)
treee635e0620f06ff1fb5a298edb0acefb4874e5dba /lib/PublicInbox/SearchView.pm
parent6f3e8ec25faa1fc71c0bc13bb2615b8fa45a44a1 (diff)
downloadpublic-inbox-5d5789076ed4da7502ff18748d1553c899b78907.tar.gz
We already pre-populate the hashref when loading $smsg
(PublicInbox::SearchMsg) objects out of over.sqlite3 or Xapian,
so making expensive method calls isn't necessary in those cases.

We only need to use the method calls when SQLite or Xapian are
not available or are being populated (such as during indexing).
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r--lib/PublicInbox/SearchView.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index 828926c7..7e508bb7 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -108,14 +108,14 @@ sub mset_summary {
                         };
                         next;
                 }
-                my $s = ascii_html($smsg->subject);
-                my $f = ascii_html($smsg->from_name);
+                my $s = ascii_html($smsg->{subject});
+                my $f = ascii_html($smsg->{from_name});
                 if ($obfs_ibx) {
                         obfuscate_addrs($obfs_ibx, $s);
                         obfuscate_addrs($obfs_ibx, $f);
                 }
-                my $date = PublicInbox::View::fmt_ts($smsg->ds);
-                my $mid = PublicInbox::Hval->new_msgid($smsg->mid)->{href};
+                my $date = PublicInbox::View::fmt_ts($smsg->{ds});
+                my $mid = PublicInbox::Hval->new_msgid($smsg->{mid})->{href};
                 $s = '(no subject)' if $s eq '';
                 $$res .= qq{$rank. <b><a\nhref="$mid/">}.
                         $s . "</a></b>\n";