]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
nntp: avoid repeated rand() calls
authorEric Wong <e@80x24.org>
Thu, 27 Mar 2025 23:20:46 +0000 (23:20 +0000)
committerEric Wong <e@80x24.org>
Sun, 30 Mar 2025 18:19:32 +0000 (18:19 +0000)
commit5f6a55088d76f94987116cad6c355e86b553e68f
treec436a5913255e0232696c2b848d478e817db579d
parent3988b91d29ea037df1f1790ca18d4457e833d87b
nntp: avoid repeated rand() calls

We only need to generate the secret salt once, so initialize
it early to avoid potentially expensive `rand' ops in repeated
calls to wildmat2re.  We'll also stringify it early to hopefully
improve CoW sharing and reduce fragmentation.
lib/PublicInbox/NNTP.pm