From 4ba25f97b16af73492078b1f6869e63f656f8842 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 8 Apr 2024 09:49:21 +0000 Subject: www: speed up global manifest.js.gz w/ "all" extindex By reducing internal event loop iterations, this brings 300+ inboxes down ~32ms to ~27ms. It should also be more consistent on servers with busy event loops since all the Xapian DB traffic happens at once, theoretically mproving cache utilization. --- lib/PublicInbox/ConfigIter.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/ConfigIter.pm') diff --git a/lib/PublicInbox/ConfigIter.pm b/lib/PublicInbox/ConfigIter.pm index 14fcef83..f9e3451a 100644 --- a/lib/PublicInbox/ConfigIter.pm +++ b/lib/PublicInbox/ConfigIter.pm @@ -1,12 +1,11 @@ -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # Intended for PublicInbox::DS::event_loop in read-only daemons # to avoid each_inbox() monopolizing the event loop when hundreds/thousands # of inboxes are in play. package PublicInbox::ConfigIter; -use strict; -use v5.10.1; +use v5.12; sub new { my ($class, $pi_cfg, $cb, @args) = @_; @@ -25,7 +24,7 @@ sub event_step { PublicInbox::DS::requeue($self) if defined($section); } -# for generic PSGI servers +# for generic PSGI servers, but also ManifestJsGz w/ ALL extindex sub each_section { my $self = shift; my ($pi_cfg, $i, $cb, @arg) = @$self; -- cgit v1.2.3-24-ge0c7