]> Sergey Matveev's repositories - public-inbox.git/commit
inbox: rewrite cleanup to be more aggressive
authorEric Wong <e@80x24.org>
Tue, 28 Sep 2021 23:11:05 +0000 (23:11 +0000)
committerEric Wong <e@80x24.org>
Wed, 29 Sep 2021 00:08:33 +0000 (00:08 +0000)
commit7e5cea05f061e757f36b3eb9abcd285425365224
tree766c0a85c98f245055b71268901c6d6d6a45a5ed
parenta29d72521f20576916e4c407263566cfa972416b
inbox: rewrite cleanup to be more aggressive

Avoid relying on a giant cleanup hash and instead use the new
DS->add_uniq_timer API to amortize the pause times associated
with having to cleanup many inboxes.  We can also use smaller
intervals for this, as well.

We now discard SQLite DB handles at cleanup.  Each of these can
use several megabytes of memory, which adds up with
hundreds/thousands of inboxes.  Since per-inbox access intervals
are unpredictable and opening an SQLite handle is relatively
inexpensive, release memory more aggressively to avoid the heap
having to hit swap.
lib/PublicInbox/Git.pm
lib/PublicInbox/Inbox.pm