]> Sergey Matveev's repositories - public-inbox.git/commitdiff
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)
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.


No differences found