[PATCH 2/2] n_m_remove_indexed_terms: reduce number of Xapian API calls.
david at tethera.net
Wed May 22 04:58:08 PDT 2019
David Bremner <david at tethera.net> writes:
> Previously this functioned scanned every term attached to a given
> Xapian document. It turns out we know how to read only the terms we
> need to preserve (and we might have already done so). This commit
> replaces many calls to Xapian::Document::remove_term with one call to
> ::clear_terms, and a (typically much smaller) number of calls to
> ::add_term. Roughly speaking this is based on the assumption that most
> messages have more text than they have tags.
> According to the performance test suite, this yields a roughly 40%
> speedup on "notmuch reindex '*'"
I've marked this ready to merge. If you have any feedback, please send
More information about the notmuch