about summary refs log tree commit homepage
path: root/lib/PublicInbox/ManifestJsGz.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2024-04-08 09:49:21 +0000
committerEric Wong <e@80x24.org>2024-04-11 18:17:25 +0000
commit4ba25f97b16af73492078b1f6869e63f656f8842 (patch)
treee9a1afe0a793709a293bc3f43c6599994f058b5a /lib/PublicInbox/ManifestJsGz.pm
parent832556492d3b94f9cadf9a4d249b519f30bae64d (diff)
downloadpublic-inbox-4ba25f97b16af73492078b1f6869e63f656f8842.tar.gz
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.
Diffstat (limited to 'lib/PublicInbox/ManifestJsGz.pm')
-rw-r--r--lib/PublicInbox/ManifestJsGz.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/ManifestJsGz.pm b/lib/PublicInbox/ManifestJsGz.pm
index 1f739baa..be5d5f2a 100644
--- a/lib/PublicInbox/ManifestJsGz.pm
+++ b/lib/PublicInbox/ManifestJsGz.pm
@@ -82,8 +82,9 @@ sub response {
                                         $ctx->can('list_match_i'), $re, $ctx);
         sub {
                 $ctx->{-wcb} = $_[0]; # HTTP server callback
-                $ctx->{env}->{'pi-httpd.async'} ?
-                                $iter->event_step : $iter->each_section;
+                ($ctx->{www}->{pi_cfg}->ALL ||
+                                        !$ctx->{env}->{'pi-httpd.async'}) ?
+                                $iter->each_section : $iter->event_step;
         }
 }