]> Sergey Matveev's repositories - public-inbox.git/commit
newswww: use ->ALL to avoid O(n) inbox scan
authorEric Wong <e@80x24.org>
Fri, 4 Dec 2020 22:03:48 +0000 (22:03 +0000)
committerEric Wong <e@80x24.org>
Sat, 5 Dec 2020 21:41:52 +0000 (21:41 +0000)
commit629e22b8351e96a831535baa2854d0c9ca014445
treec0739fd29537cfec066daa3938a8dfbe688e7bff
parent6ef28d7e22a499b8a9d531d1c16acd4847496e8e
newswww: use ->ALL to avoid O(n) inbox scan

We can avoid doing a Message-ID lookup on every single inbox
by using ->ALL to scan its over.sqlite3 DB.  This mimics NNTP
behavior and picks the first message indexed, though redirecting
to /all/$MESSAGE_ID/ could be done.

With the current lore.kernel.org set of inboxes (~140), this
provides a 10-40% speedup depending on inbox ordering.
lib/PublicInbox/Config.pm
lib/PublicInbox/NewsWWW.pm