Xapian::WritableDatabase: commit changes depending on the buffer size

Olly Betts olly at survex.com
Sun Feb 14 11:23:22 GMT 2016


On Sat, Feb 06, 2016 at 07:39:15PM +0300, john veter wrote:
> I think that the solution is to call commit() depending on the buffer
> actual size (in megabytes), but not based on the number of the indexed
> documents. So, is there any way to estimate the size of the buffer of
> the Xapian::WritableDatabase object?

The problem is that we don't have a good way to determine the size of
the buffered data as it is currently stored.

There's a plan to change how it is stored, and one benefit will be that
we will then know how much RAM it is using.  I thought we had a ticket
for this, but a quick look only found a couple for related issues.

> P.S.  may be somebody have other suggestions how to solve the problem?

The approach already suggested by Jean-Francois seems plausible, and is
at least simple to calculate.

Cheers,
    Olly



More information about the Xapian-discuss mailing list