From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 726CC1F5C9; Wed, 11 Sep 2024 21:28:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1726090135; bh=JtXdOXekn57zeWgHsNegwyHngQ4YbM7wZrQV64YNcD4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2G3WYaCIbiUxKAuPnmatSen6omA7LnUO/7ro1r2AfZWeJiYbGuZmu5aoxfoH2z2Ug agl+T7kupkcx8+8yqJLHqUFPy+ksTJptrelx/rXpr9L8qjkLm1v/bQo0MDy1lYAe34 bqfejA9rjPCJHOEdLegbsoBh4LGxV8eZ8rm7Fotg= Date: Wed, 11 Sep 2024 21:25:49 +0000 From: Eric Wong To: Konstantin Ryabitsev Cc: meta@public-inbox.org Subject: [PATCH] www: preload all inboxes if using ->ALL Message-ID: <20240911212549.M129540@dcvr> References: <20240909-muskox-of-illegal-engineering-dadeda@lemur> <20240910-strong-rainbow-warthog-d6fe69@lemur> <20240910202517.M408057@dcvr> <20240910-portable-paper-honeybee-2dd1ec@meerkat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240910-portable-paper-honeybee-2dd1ec@meerkat> List-Id: Konstantin Ryabitsev wrote: > On Tue, Sep 10, 2024 at 08:25:17PM GMT, Eric Wong wrote: > > That shouldn't happen, and I can't seem to reproduce it, > > either... Oh duh, I'm pretty sure the below fixes. Losing my mind from heat and ant infestations :< -------------8<----------- Subject: [PATCH] www: preload all inboxes if using ->ALL This ought to improve memory layout and ensure the regexp for address => inbox linkification works when hitting /$EXTINBOX/$MSGID/ links first (instead of /$INBOX/$MSGID) This fill_all call is redundant for cindex users who get the preload anyways, but necessary for non-cindex users. This should also avoid the broken/empty regexps problem described in 3b51fcc196e3 (view: fix addr2url mapping corruption, 2024-09-06) Fixes: 48cbe0c3c8dc4d26 (www: linkify inbox addresses in To/Cc headers, 2024-01-09) Reported-by: Konstantin Ryabitsev Link: https://public-inbox.org/meta/20240910-strong-rainbow-warthog-d6fe69@lemur/ --- lib/PublicInbox/WWW.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 289599b8..1bc2966d 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -187,7 +187,10 @@ sub preload { if (defined($pi_cfg->{'publicinbox.cgitrc'})) { $pi_cfg->limiter('-cgit'); } - $pi_cfg->ALL and require PublicInbox::Isearch; + if ($pi_cfg->ALL) { + require PublicInbox::Isearch; + $pi_cfg->fill_all; + } $self->cgit; $self->coderepo; $self->stylesheets_prepare($_) for ('', '../', '../../');