unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: meta@public-inbox.org
Subject: [PATCH] www: preload all inboxes if using ->ALL
Date: Wed, 11 Sep 2024 21:25:49 +0000	[thread overview]
Message-ID: <20240911212549.M129540@dcvr> (raw)
In-Reply-To: <20240910-portable-paper-honeybee-2dd1ec@meerkat>

Konstantin Ryabitsev <konstantin@linuxfoundation.org> 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 <konstantin@linuxfoundation.org>
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 ('', '../', '../../');

  reply	other threads:[~2024-09-11 21:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 20:55 Bug: mailing list linkification in headers incorrect Konstantin Ryabitsev
2024-09-09 21:15 ` Filip Hejsek
2024-09-09 22:11 ` Eric Wong
2024-09-10 14:07   ` Konstantin Ryabitsev
2024-09-10 14:05 ` [PATCH] view: fix x-post links for relative urls Konstantin Ryabitsev
2024-09-10 20:25   ` Eric Wong
2024-09-10 20:29     ` Konstantin Ryabitsev
2024-09-11 21:25       ` Eric Wong [this message]
2024-09-12 15:19         ` [PATCH] www: preload all inboxes if using ->ALL Konstantin Ryabitsev
2024-09-12 21:33           ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240911212549.M129540@dcvr \
    --to=e@80x24.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).