diff options
author | Eric Wong <e@80x24.org> | 2020-11-28 05:09:12 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-11-29 02:25:47 +0000 |
commit | 24e103d37b423c1c718e7f0f6285419005a98be5 (patch) | |
tree | 50a191827fc59cb7aa8957fccc638e5eb5336e9e /lib/PublicInbox/NNTPD.pm | |
parent | 50ac81092ba1034f3055ddabb3d7cc7853edfa41 (diff) | |
download | public-inbox-24e103d37b423c1c718e7f0f6285419005a98be5.tar.gz |
We can amortize the cost of NEWGROUPS time filtering using the long_response API. This lets us handle hundreds/thousands of inboxes without monopolizing the event loop for this command. Further speedup is possible using MiscSearch, but that requires not-yet-done indexing changes to MiscIdx.
Diffstat (limited to 'lib/PublicInbox/NNTPD.pm')
-rw-r--r-- | lib/PublicInbox/NNTPD.pm | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/PublicInbox/NNTPD.pm b/lib/PublicInbox/NNTPD.pm index 4de1944b..33bc5fda 100644 --- a/lib/PublicInbox/NNTPD.pm +++ b/lib/PublicInbox/NNTPD.pm @@ -24,7 +24,6 @@ sub new { groups => {}, err => \*STDERR, out => \*STDOUT, - grouplist => [], pi_config => $pi_config, servername => $name, greet => \"201 $name ready - post via email\r\n", @@ -60,9 +59,7 @@ sub refresh_groups { delete $groups->{$ngname}; } }); - my @names = sort(keys %$groups); - $self->{grouplist} = [ map { $groups->{$_} } @names ]; - $self->{groupnames} = \@names; + $self->{groupnames} = [ sort(keys %$groups) ]; $self->{pi_config} = $pi_config; # this will destroy old groups that got deleted $self->{groups} = $groups; |