From 2e3d2fdcad7181b8b4a8893023d4819a25e54ba1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 Nov 2023 11:41:07 +0000 Subject: inbox: shrink data structures for publicinbox.*.hide We no longer vivify the intermediate $ibx->{-hide} hashref, instead we use $ibx->{-hide_$KEY} directly. This avoids an intermediate hashref and extra hash table lookups. --- lib/PublicInbox/WwwListing.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/WwwListing.pm') diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index e3d2e84c..2d6c74da 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -79,7 +79,7 @@ sub hide_key { 'www' } sub hide_inbox { my ($ctx, $ibx, $re) = @_; - $ibx->{-hide}->{$ctx->hide_key} || + $ibx->{'-hide_'.$ctx->hide_key} || !grep(/$re/, @{$ibx->{url} // $ctx->{-name_is_url} // []}) } -- cgit v1.2.3-24-ge0c7