notmuch/lib
David Bremner 9ad19e4454 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.
2021-04-18 09:50:36 -03:00
..
add-message.cc lib: replace use of static_cast for writable databases 2020-07-28 08:47:58 -03:00
built-with.c build: drop support for xapian versions less than 1.4 2020-04-23 21:28:45 -03:00
config.cc lib: provide notmuch_config_path 2021-03-27 09:26:14 -03:00
database-private.h lib: provide notmuch_config_path 2021-03-27 09:26:14 -03:00
database.cc lib: add NOTMUCH_STATUS_NO_DATABASE 2021-03-27 09:26:14 -03:00
directory.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
features.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
filenames.c lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
index.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
indexopts.c lib: run uncrustify 2021-03-13 08:45:34 -04:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local lib: factor out notmuch_database_open* related code to own file 2020-12-23 09:25:01 -04:00
message-file.c lib: support splitting mail from database location. 2021-03-20 07:39:12 -03:00
message-id.c lib: run uncrustify 2019-06-14 07:41:27 -03:00
message-private.h lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
message-property.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
message.cc lib: directly traverse postlists in _n_message_delete 2021-04-18 09:50:36 -03:00
messages.c lib: run uncrustify 2019-06-14 07:41:27 -03:00
notmuch-private.h lib: add NOTMUCH_STATUS_NO_DATABASE 2021-03-27 09:26:14 -03:00
notmuch.h lib: provide notmuch_config_path 2021-03-27 09:26:14 -03:00
notmuch.sym build: switch to hiding libnotmuch symbols by default 2017-05-12 07:17:18 -03:00
open.cc lib: provide notmuch_config_path 2021-03-27 09:26:14 -03:00
parse-time-vrp.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
parse-time-vrp.h lib: migrate from Xapian ValueRangeProcessor to RangeProcessor 2020-07-11 17:20:09 -03:00
prefix.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
query-fp.cc build: drop support for xapian versions less than 1.4 2020-04-23 21:28:45 -03:00
query-fp.h build: drop support for xapian versions less than 1.4 2020-04-23 21:28:45 -03:00
query.cc lib: run uncrustify 2019-06-14 07:41:27 -03:00
regexp-fields.cc build: drop support for xapian versions less than 1.4 2020-04-23 21:28:45 -03:00
regexp-fields.h build: drop support for xapian versions less than 1.4 2020-04-23 21:28:45 -03:00
sha1.c lib: run uncrustify 2019-06-14 07:41:27 -03:00
string-list.c lib: run uncrustify 2019-06-14 07:41:27 -03:00
string-map.c lib: run uncrustify 2021-03-13 08:45:34 -04:00
tags.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
thread-fp.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
thread-fp.h build: drop support for xapian versions less than 1.4 2020-04-23 21:28:45 -03:00
thread.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00