]> Sergey Matveev's repositories - public-inbox.git/commit
pop3: speed up STAT slightly (~1%)
authorEric Wong <e@80x24.org>
Fri, 12 Aug 2022 22:09:19 +0000 (22:09 +0000)
committerEric Wong <e@80x24.org>
Tue, 16 Aug 2022 03:31:45 +0000 (03:31 +0000)
commitd36b6085b7cb78eba6e904d5df82bbe5f938ed2a
tree582edf31cb9723d0a968c42afa92a49a18274d20
parentfd261b9e6567450573531fadec741ec887d9d6b3
pop3: speed up STAT slightly (~1%)

We can calculate the total size of the mailbox while generating
the cache, which allows us to iterate the cache again to
calculate the size of the mailbox slice.  While we're in the
area, simplify the loop and avoid needlessly updating the `$beg'
variable.

This adds a small amount of constant time overhead to DELE,
however that is amortized across multiple requests for fairness.
lib/PublicInbox/POP3.pm