aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/docs/source/database.rst
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-04-16 09:00:39 -0300
committerDavid Bremner <david@tethera.net>2021-04-18 09:50:36 -0300
commit9ad19e4454ff98342a6c0ec5a7e44c8c516e6fcd (patch)
tree4455d57921e0aea0ee9a4ba75ec2dd73b4a8fdaa /bindings/python/docs/source/database.rst
parent8a64f725dfb5d29f971aaf9d12e7e620e8c5a2e2 (diff)
lib: directly traverse postlists in _n_message_delete
This is intended to fix the slow behaviour of "notmuch new" (and possibly "notmuch reindex") when large numbers of files are deleted. The underlying issue [1] seems to be the Xapian glass backend spending a large amount of time in db.has_positions when running queries with large-ish amounts of unflushed changes. This commit removes two uses of Xapian queries [2], and replaces them with an approximation of what Xapian would do after optimizing the queries. This avoids the calls to has_positions (which are in any case un-needed because we are only using boolean terms here). [1] Thanks to "andres" on IRC for narrowing down the performance bottleneck. [2] Thanks to Olly Betts of Xapian fame for talking me a through a fix that does not require people to update Xapian.
Diffstat (limited to 'bindings/python/docs/source/database.rst')
0 files changed, 0 insertions, 0 deletions