aboutsummaryrefslogtreecommitdiff
path: root/lib/thread.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2019-04-15 22:46:16 -0300
committerDavid Bremner <david@tethera.net>2019-05-23 08:00:56 -0300
commit97939170b3e8b31f88520932aa20bf1b98e469c3 (patch)
tree0ff346f75a3bbfacc25681fff68a488198d56c38 /lib/thread.cc
parent3563079be37737aab084e957b494070eaea9c2f6 (diff)
n_m_remove_indexed_terms: reduce number of Xapian API calls.
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 '*'"
Diffstat (limited to 'lib/thread.cc')
0 files changed, 0 insertions, 0 deletions