]> Sergey Matveev's repositories - public-inbox.git/commit
searchidx: switch to accounting by message bytes
authorEric Wong <e@80x24.org>
Wed, 14 Jun 2017 00:14:47 +0000 (00:14 +0000)
committerEric Wong <e@80x24.org>
Wed, 14 Jun 2017 00:15:45 +0000 (00:15 +0000)
commit970eb1fd83b93c790d2faed6bf64a97d6d5fe126
tree644162ea4055a4c674e0fd78c89495008bbac12c
parent7eeadcb62729b0efbcb53cd9b7b181897c92cf9a
searchidx: switch to accounting by message bytes

Xapian memory usage is tied to the size of the indexed
text, so take the raw message size into account when
deciding when to flush Xapian data.

More importantly, we now flush Xapian before we have it
buffer beyond our maximum; and we do it unconditionally
to prevent even high priority processes from OOM-ing.
lib/PublicInbox/SearchIdx.pm