]> Sergey Matveev's repositories - public-inbox.git/commit
nntp: NEWNEWS: speed up filtering
authorEric Wong <e@80x24.org>
Fri, 27 Nov 2020 09:52:47 +0000 (09:52 +0000)
committerEric Wong <e@80x24.org>
Sat, 28 Nov 2020 04:53:16 +0000 (04:53 +0000)
commitb700fce60f25038ecd32551027e44b9b4b3ac544
treebf09d97391385d93564913d3e65fafce718af655
parent7b20e5135238a2780ac3df3198a02e9fbda4ba18
nntp: NEWNEWS: speed up filtering

With 50K newsgroups, the filtering phase goes from ~2000 seconds
to ~90 MILLISECONDS by relying on the grep perlop.  This moves
->over checking out of the main dispatch and amortizes the cost
via long_response.  (Fairly scheduled) long_response time in
newnews_i now takes ~360 seconds as opposed to ~30 seconds
before this change, however; but the initial filtering speedup
eliminating 2000s is more than worth it.
lib/PublicInbox/NNTP.pm