diff options
author | Eric Wong <e@yhbt.net> | 2020-04-17 09:28:49 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-04-17 09:52:26 +0000 |
commit | d0147582e289fdd4cdd84e91d8b0f8ae9c230124 (patch) | |
tree | 02d60802e4eef79bbbe7f9ca4a2210f2d3a07f28 /lib/PublicInbox/SearchView.pm | |
parent | c23c96b1da7bfff3efe64ad415c0feb424d34559 (diff) | |
download | public-inbox-d0147582e289fdd4cdd84e91d8b0f8ae9c230124.tar.gz |
We can rid ourselves of a layer of indirection by subclassing PublicInbox::Smsg instead of using a container object to hold each $smsg. Furthermore, the `{id}' vs. `{mid}' field name confusion is eliminated. This reduces the size of the $rootset passed to walk_thread by around 15%, that is over 50K memory when rendering a /$INBOX/ landing page.
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 4fbf59ef..4336e4d9 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -243,8 +243,8 @@ sub search_nav_bot { sub sort_relevance { [ sort { - (eval { $b->topmost->{smsg}->{pct} } // 0) <=> - (eval { $a->topmost->{smsg}->{pct} } // 0) + (eval { $b->topmost->{pct} } // 0) <=> + (eval { $a->topmost->{pct} } // 0) } @{$_[0]} ] } |